Fossil SCM
Remove pointless code that initializes a BSS data structure to zeros, even though it is already all-zero. This avoids a compiler warning in GCC7.
Commit
5419e7fcecdbcc099738a2a6d194beca54fe7503d5b5d108b343b83eae4fd999
Parent
2c8bff0b2bab679…
1 file changed
-6
-6
| --- src/util.c | ||
| +++ src/util.c | ||
| @@ -276,16 +276,10 @@ | ||
| 276 | 276 | ** Returns 0 on error (no more timers available), with 1+ being valid |
| 277 | 277 | ** timer IDs. |
| 278 | 278 | */ |
| 279 | 279 | int fossil_timer_start(){ |
| 280 | 280 | int i; |
| 281 | - static char once = 0; | |
| 282 | - if(!once){ | |
| 283 | - once = 1; | |
| 284 | - memset(&fossilTimerList, 0, | |
| 285 | - count(fossilTimerList)); | |
| 286 | - } | |
| 287 | 281 | for( i = 0; i < FOSSIL_TIMER_COUNT; ++i ){ |
| 288 | 282 | struct FossilTimer * ft = &fossilTimerList[i]; |
| 289 | 283 | if(ft->id) continue; |
| 290 | 284 | ft->id = i+1; |
| 291 | 285 | fossil_cpu_times( &ft->u, &ft->s ); |
| 292 | 286 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -276,16 +276,10 @@ | |
| 276 | ** Returns 0 on error (no more timers available), with 1+ being valid |
| 277 | ** timer IDs. |
| 278 | */ |
| 279 | int fossil_timer_start(){ |
| 280 | int i; |
| 281 | static char once = 0; |
| 282 | if(!once){ |
| 283 | once = 1; |
| 284 | memset(&fossilTimerList, 0, |
| 285 | count(fossilTimerList)); |
| 286 | } |
| 287 | for( i = 0; i < FOSSIL_TIMER_COUNT; ++i ){ |
| 288 | struct FossilTimer * ft = &fossilTimerList[i]; |
| 289 | if(ft->id) continue; |
| 290 | ft->id = i+1; |
| 291 | fossil_cpu_times( &ft->u, &ft->s ); |
| 292 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -276,16 +276,10 @@ | |
| 276 | ** Returns 0 on error (no more timers available), with 1+ being valid |
| 277 | ** timer IDs. |
| 278 | */ |
| 279 | int fossil_timer_start(){ |
| 280 | int i; |
| 281 | for( i = 0; i < FOSSIL_TIMER_COUNT; ++i ){ |
| 282 | struct FossilTimer * ft = &fossilTimerList[i]; |
| 283 | if(ft->id) continue; |
| 284 | ft->id = i+1; |
| 285 | fossil_cpu_times( &ft->u, &ft->s ); |
| 286 |