Fossil SCM

Fix compiler warnings seen with MSVC. Add comments.

mistachkin 2015-11-24 23:41 trunk
Commit 52e3d9d845d1d1ad22f72ece0cf3939d3b52ab3a
2 files changed +2 -2 +5 -1
+2 -2
--- src/info.c
+++ src/info.c
@@ -2902,18 +2902,18 @@
29022902
}
29032903
if( pzNewTags!=0 ){
29042904
for(i=0; i<nTags; i++){
29052905
if( pzNewTags[i] && pzNewTags[i][0] ) add_tag(pzNewTags[i]);
29062906
}
2907
- fossil_free(pzNewTags);
2907
+ fossil_free((void *)pzNewTags);
29082908
}
29092909
if( pzCancelTags!=0 ){
29102910
for(i=0; i<nCancels; i++){
29112911
if( pzCancelTags[i] && pzCancelTags[i][0] )
29122912
cancel_tag(rid,pzCancelTags[i]);
29132913
}
2914
- fossil_free(pzCancelTags);
2914
+ fossil_free((void *)pzCancelTags);
29152915
}
29162916
if( fHide && !fHasHidden ) hide_branch();
29172917
if( fClose && !fHasClosed ) close_leaf(rid);
29182918
if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
29192919
apply_newtags(&ctrl, rid, zUuid);
29202920
--- 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 @@
903903
if( pzArgs==0 && nAllocArgs==0 ){
904904
nAllocArgs = 1;
905905
pzArgs = fossil_malloc( nAllocArgs*sizeof(pzArgs[0]) );
906906
}else if( nAllocArgs<=nUsedArgs ){
907907
nAllocArgs = nAllocArgs*2;
908
- pzArgs = fossil_realloc( pzArgs, nAllocArgs*sizeof(pzArgs[0]) );
908
+ pzArgs = fossil_realloc( (void *)pzArgs, nAllocArgs*sizeof(pzArgs[0]) );
909909
}
910910
pzArgs[nUsedArgs++] = zOption;
911911
}
912912
*pnUsedArgs = nUsedArgs;
913913
return pzArgs;
@@ -2286,12 +2286,16 @@
22862286
22872287
/*
22882288
** Note that the following command is used by ssh:// processing.
22892289
**
22902290
** COMMAND: test-http
2291
+**
22912292
** Works like the http command but gives setup permission to all users.
22922293
**
2294
+** Options:
2295
+** --th-trace trace TH1 execution (for debugging purposes)
2296
+**
22932297
*/
22942298
void cmd_test_http(void){
22952299
const char *zIpAddr; /* IP address of remote client */
22962300
22972301
Th_InitTraceLog();
22982302
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button