Fossil SCM

unused variable "fossilTimer"

jan.nijtmans 2013-05-13 10:50 trunk
Commit 55d7e2c14a93643e48ba98f4c07730a7742f1ab1
1 file changed +6 -7
+6 -7
--- src/util.c
+++ src/util.c
@@ -171,28 +171,27 @@
171171
getrusage(RUSAGE_SELF, &s);
172172
if( piUser ){
173173
*piUser = ((sqlite3_uint64)s.ru_utime.tv_sec)*1000000 + s.ru_utime.tv_usec;
174174
}
175175
if( piKernel ){
176
- *piKernel =
176
+ *piKernel =
177177
((sqlite3_uint64)s.ru_stime.tv_sec)*1000000 + s.ru_stime.tv_usec;
178178
}
179179
#endif
180180
}
181181
182182
/*
183183
** Internal helper type for fossil_timer_xxx().
184184
*/
185
+enum FossilTimerEnum {
186
+ FOSSIL_TIMER_COUNT = 10 /* Number of timers we can track. */
187
+};
185188
static struct FossilTimer {
186189
sqlite3_uint64 u; /* "User" CPU times */
187190
sqlite3_uint64 s; /* "System" CPU times */
188191
int id; /* positive if allocated, else 0. */
189
-} fossilTimer = { 0U, 0U, 0 };
190
-enum FossilTimerEnum {
191
- FOSSIL_TIMER_COUNT = 10 /* Number of timers we can track. */
192
-};
193
-static struct FossilTimer fossilTimerList[FOSSIL_TIMER_COUNT] = {{0,0,0}};
192
+} fossilTimerList[FOSSIL_TIMER_COUNT] = {{0,0,0}};
194193
195194
/*
196195
** Stores the current CPU times into the shared timer list
197196
** and returns that timer's internal ID. Pass that ID to
198197
** fossil_timer_fetch() to get the elapsed time for that
@@ -210,11 +209,11 @@
210209
int i;
211210
static char once = 0;
212211
if(!once){
213212
once = 1;
214213
memset(&fossilTimerList, 0,
215
- sizeof(fossilTimerList)/sizeof(fossilTimerList[0]));
214
+ count(fossilTimerList));
216215
}
217216
for( i = 0; i < FOSSIL_TIMER_COUNT; ++i ){
218217
struct FossilTimer * ft = &fossilTimerList[i];
219218
if(ft->id) continue;
220219
ft->id = i+1;
221220
--- src/util.c
+++ src/util.c
@@ -171,28 +171,27 @@
171 getrusage(RUSAGE_SELF, &s);
172 if( piUser ){
173 *piUser = ((sqlite3_uint64)s.ru_utime.tv_sec)*1000000 + s.ru_utime.tv_usec;
174 }
175 if( piKernel ){
176 *piKernel =
177 ((sqlite3_uint64)s.ru_stime.tv_sec)*1000000 + s.ru_stime.tv_usec;
178 }
179 #endif
180 }
181
182 /*
183 ** Internal helper type for fossil_timer_xxx().
184 */
 
 
 
185 static struct FossilTimer {
186 sqlite3_uint64 u; /* "User" CPU times */
187 sqlite3_uint64 s; /* "System" CPU times */
188 int id; /* positive if allocated, else 0. */
189 } fossilTimer = { 0U, 0U, 0 };
190 enum FossilTimerEnum {
191 FOSSIL_TIMER_COUNT = 10 /* Number of timers we can track. */
192 };
193 static struct FossilTimer fossilTimerList[FOSSIL_TIMER_COUNT] = {{0,0,0}};
194
195 /*
196 ** Stores the current CPU times into the shared timer list
197 ** and returns that timer's internal ID. Pass that ID to
198 ** fossil_timer_fetch() to get the elapsed time for that
@@ -210,11 +209,11 @@
210 int i;
211 static char once = 0;
212 if(!once){
213 once = 1;
214 memset(&fossilTimerList, 0,
215 sizeof(fossilTimerList)/sizeof(fossilTimerList[0]));
216 }
217 for( i = 0; i < FOSSIL_TIMER_COUNT; ++i ){
218 struct FossilTimer * ft = &fossilTimerList[i];
219 if(ft->id) continue;
220 ft->id = i+1;
221
--- src/util.c
+++ src/util.c
@@ -171,28 +171,27 @@
171 getrusage(RUSAGE_SELF, &s);
172 if( piUser ){
173 *piUser = ((sqlite3_uint64)s.ru_utime.tv_sec)*1000000 + s.ru_utime.tv_usec;
174 }
175 if( piKernel ){
176 *piKernel =
177 ((sqlite3_uint64)s.ru_stime.tv_sec)*1000000 + s.ru_stime.tv_usec;
178 }
179 #endif
180 }
181
182 /*
183 ** Internal helper type for fossil_timer_xxx().
184 */
185 enum FossilTimerEnum {
186 FOSSIL_TIMER_COUNT = 10 /* Number of timers we can track. */
187 };
188 static struct FossilTimer {
189 sqlite3_uint64 u; /* "User" CPU times */
190 sqlite3_uint64 s; /* "System" CPU times */
191 int id; /* positive if allocated, else 0. */
192 } fossilTimerList[FOSSIL_TIMER_COUNT] = {{0,0,0}};
 
 
 
 
193
194 /*
195 ** Stores the current CPU times into the shared timer list
196 ** and returns that timer's internal ID. Pass that ID to
197 ** fossil_timer_fetch() to get the elapsed time for that
@@ -210,11 +209,11 @@
209 int i;
210 static char once = 0;
211 if(!once){
212 once = 1;
213 memset(&fossilTimerList, 0,
214 count(fossilTimerList));
215 }
216 for( i = 0; i < FOSSIL_TIMER_COUNT; ++i ){
217 struct FossilTimer * ft = &fossilTimerList[i];
218 if(ft->id) continue;
219 ft->id = i+1;
220

Keyboard Shortcuts

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