Fossil SCM
Fix compiler warnings seen with MSVC. Add comments.
Commit
52e3d9d845d1d1ad22f72ece0cf3939d3b52ab3a
Parent
ddd4cb52545c3e8…
2 files changed
+2
-2
+5
-1
+2
-2
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2902,18 +2902,18 @@ | ||
| 2902 | 2902 | } |
| 2903 | 2903 | if( pzNewTags!=0 ){ |
| 2904 | 2904 | for(i=0; i<nTags; i++){ |
| 2905 | 2905 | if( pzNewTags[i] && pzNewTags[i][0] ) add_tag(pzNewTags[i]); |
| 2906 | 2906 | } |
| 2907 | - fossil_free(pzNewTags); | |
| 2907 | + fossil_free((void *)pzNewTags); | |
| 2908 | 2908 | } |
| 2909 | 2909 | if( pzCancelTags!=0 ){ |
| 2910 | 2910 | for(i=0; i<nCancels; i++){ |
| 2911 | 2911 | if( pzCancelTags[i] && pzCancelTags[i][0] ) |
| 2912 | 2912 | cancel_tag(rid,pzCancelTags[i]); |
| 2913 | 2913 | } |
| 2914 | - fossil_free(pzCancelTags); | |
| 2914 | + fossil_free((void *)pzCancelTags); | |
| 2915 | 2915 | } |
| 2916 | 2916 | if( fHide && !fHasHidden ) hide_branch(); |
| 2917 | 2917 | if( fClose && !fHasClosed ) close_leaf(rid); |
| 2918 | 2918 | if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch); |
| 2919 | 2919 | apply_newtags(&ctrl, rid, zUuid); |
| 2920 | 2920 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2902,18 +2902,18 @@ | |
| 2902 | } |
| 2903 | if( pzNewTags!=0 ){ |
| 2904 | for(i=0; i<nTags; i++){ |
| 2905 | if( pzNewTags[i] && pzNewTags[i][0] ) add_tag(pzNewTags[i]); |
| 2906 | } |
| 2907 | fossil_free(pzNewTags); |
| 2908 | } |
| 2909 | if( pzCancelTags!=0 ){ |
| 2910 | for(i=0; i<nCancels; i++){ |
| 2911 | if( pzCancelTags[i] && pzCancelTags[i][0] ) |
| 2912 | cancel_tag(rid,pzCancelTags[i]); |
| 2913 | } |
| 2914 | fossil_free(pzCancelTags); |
| 2915 | } |
| 2916 | if( fHide && !fHasHidden ) hide_branch(); |
| 2917 | if( fClose && !fHasClosed ) close_leaf(rid); |
| 2918 | if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch); |
| 2919 | apply_newtags(&ctrl, rid, zUuid); |
| 2920 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2902,18 +2902,18 @@ | |
| 2902 | } |
| 2903 | if( pzNewTags!=0 ){ |
| 2904 | for(i=0; i<nTags; i++){ |
| 2905 | if( pzNewTags[i] && pzNewTags[i][0] ) add_tag(pzNewTags[i]); |
| 2906 | } |
| 2907 | fossil_free((void *)pzNewTags); |
| 2908 | } |
| 2909 | if( pzCancelTags!=0 ){ |
| 2910 | for(i=0; i<nCancels; i++){ |
| 2911 | if( pzCancelTags[i] && pzCancelTags[i][0] ) |
| 2912 | cancel_tag(rid,pzCancelTags[i]); |
| 2913 | } |
| 2914 | fossil_free((void *)pzCancelTags); |
| 2915 | } |
| 2916 | if( fHide && !fHasHidden ) hide_branch(); |
| 2917 | if( fClose && !fHasClosed ) close_leaf(rid); |
| 2918 | if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch); |
| 2919 | apply_newtags(&ctrl, rid, zUuid); |
| 2920 |
+5
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -903,11 +903,11 @@ | ||
| 903 | 903 | if( pzArgs==0 && nAllocArgs==0 ){ |
| 904 | 904 | nAllocArgs = 1; |
| 905 | 905 | pzArgs = fossil_malloc( nAllocArgs*sizeof(pzArgs[0]) ); |
| 906 | 906 | }else if( nAllocArgs<=nUsedArgs ){ |
| 907 | 907 | nAllocArgs = nAllocArgs*2; |
| 908 | - pzArgs = fossil_realloc( pzArgs, nAllocArgs*sizeof(pzArgs[0]) ); | |
| 908 | + pzArgs = fossil_realloc( (void *)pzArgs, nAllocArgs*sizeof(pzArgs[0]) ); | |
| 909 | 909 | } |
| 910 | 910 | pzArgs[nUsedArgs++] = zOption; |
| 911 | 911 | } |
| 912 | 912 | *pnUsedArgs = nUsedArgs; |
| 913 | 913 | return pzArgs; |
| @@ -2286,12 +2286,16 @@ | ||
| 2286 | 2286 | |
| 2287 | 2287 | /* |
| 2288 | 2288 | ** Note that the following command is used by ssh:// processing. |
| 2289 | 2289 | ** |
| 2290 | 2290 | ** COMMAND: test-http |
| 2291 | +** | |
| 2291 | 2292 | ** Works like the http command but gives setup permission to all users. |
| 2292 | 2293 | ** |
| 2294 | +** Options: | |
| 2295 | +** --th-trace trace TH1 execution (for debugging purposes) | |
| 2296 | +** | |
| 2293 | 2297 | */ |
| 2294 | 2298 | void cmd_test_http(void){ |
| 2295 | 2299 | const char *zIpAddr; /* IP address of remote client */ |
| 2296 | 2300 | |
| 2297 | 2301 | Th_InitTraceLog(); |
| 2298 | 2302 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -903,11 +903,11 @@ | |
| 903 | if( pzArgs==0 && nAllocArgs==0 ){ |
| 904 | nAllocArgs = 1; |
| 905 | pzArgs = fossil_malloc( nAllocArgs*sizeof(pzArgs[0]) ); |
| 906 | }else if( nAllocArgs<=nUsedArgs ){ |
| 907 | nAllocArgs = nAllocArgs*2; |
| 908 | pzArgs = fossil_realloc( pzArgs, nAllocArgs*sizeof(pzArgs[0]) ); |
| 909 | } |
| 910 | pzArgs[nUsedArgs++] = zOption; |
| 911 | } |
| 912 | *pnUsedArgs = nUsedArgs; |
| 913 | return pzArgs; |
| @@ -2286,12 +2286,16 @@ | |
| 2286 | |
| 2287 | /* |
| 2288 | ** Note that the following command is used by ssh:// processing. |
| 2289 | ** |
| 2290 | ** COMMAND: test-http |
| 2291 | ** Works like the http command but gives setup permission to all users. |
| 2292 | ** |
| 2293 | */ |
| 2294 | void cmd_test_http(void){ |
| 2295 | const char *zIpAddr; /* IP address of remote client */ |
| 2296 | |
| 2297 | Th_InitTraceLog(); |
| 2298 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -903,11 +903,11 @@ | |
| 903 | if( pzArgs==0 && nAllocArgs==0 ){ |
| 904 | nAllocArgs = 1; |
| 905 | pzArgs = fossil_malloc( nAllocArgs*sizeof(pzArgs[0]) ); |
| 906 | }else if( nAllocArgs<=nUsedArgs ){ |
| 907 | nAllocArgs = nAllocArgs*2; |
| 908 | pzArgs = fossil_realloc( (void *)pzArgs, nAllocArgs*sizeof(pzArgs[0]) ); |
| 909 | } |
| 910 | pzArgs[nUsedArgs++] = zOption; |
| 911 | } |
| 912 | *pnUsedArgs = nUsedArgs; |
| 913 | return pzArgs; |
| @@ -2286,12 +2286,16 @@ | |
| 2286 | |
| 2287 | /* |
| 2288 | ** Note that the following command is used by ssh:// processing. |
| 2289 | ** |
| 2290 | ** COMMAND: test-http |
| 2291 | ** |
| 2292 | ** Works like the http command but gives setup permission to all users. |
| 2293 | ** |
| 2294 | ** Options: |
| 2295 | ** --th-trace trace TH1 execution (for debugging purposes) |
| 2296 | ** |
| 2297 | */ |
| 2298 | void cmd_test_http(void){ |
| 2299 | const char *zIpAddr; /* IP address of remote client */ |
| 2300 | |
| 2301 | Th_InitTraceLog(); |
| 2302 |