[PATCH] fio: shadow warnings
authorJens Axboe <axboe@suse.de>
Thu, 1 Dec 2005 11:18:31 +0000 (12:18 +0100)
committerJens Axboe <axboe@suse.de>
Thu, 1 Dec 2005 11:18:31 +0000 (12:18 +0100)
fio.c

diff --git a/fio.c b/fio.c
index 9677cdf08a81ac4b5014adfb66d0e6b80b669e18..594d919c80808bcd95a69a152861df785efba88c 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -88,14 +88,14 @@ static sem_t startup_sem;
 
 #define TERMINATE_ALL          (-1)
 
-static void terminate_threads(int groupid)
+static void terminate_threads(int group_id)
 {
        int i;
 
        for (i = 0; i < thread_number; i++) {
                struct thread_data *td = &threads[i];
 
-               if (groupid == TERMINATE_ALL || groupid == td->groupid) {
+               if (group_id == TERMINATE_ALL || groupid == td->groupid) {
                        td->terminate = 1;
                        td->start_delay = 0;
                }
@@ -284,19 +284,19 @@ static inline void add_stat_sample(struct io_stat *is, unsigned long val)
        is->samples++;
 }
 
-static void add_log_sample(struct thread_data *td, struct io_log *log,
+static void add_log_sample(struct thread_data *td, struct io_log *iolog,
                           unsigned long val)
 {
-       if (log->nr_samples == log->max_samples) {
-               int new_size = sizeof(struct io_sample) * log->max_samples * 2;
+       if (iolog->nr_samples == iolog->max_samples) {
+               int new_size = sizeof(struct io_sample) * iolog->max_samples*2;
 
-               log->log = realloc(log->log, new_size);
-               log->max_samples <<= 1;
+               iolog->log = realloc(iolog->log, new_size);
+               iolog->max_samples <<= 1;
        }
 
-       log->log[log->nr_samples].val = val;
-       log->log[log->nr_samples].time = mtime_since_now(&td->start);
-       log->nr_samples++;
+       iolog->log[iolog->nr_samples].val = val;
+       iolog->log[iolog->nr_samples].time = mtime_since_now(&td->start);
+       iolog->nr_samples++;
 }
 
 static void add_clat_sample(struct thread_data *td, unsigned long msec)
@@ -1856,12 +1856,12 @@ err:
 
 }
 
-static void *fork_main(int shm_id, int offset)
+static void *fork_main(int shmid, int offset)
 {
        struct thread_data *td;
        void *data;
 
-       data = shmat(shm_id, NULL, 0);
+       data = shmat(shmid, NULL, 0);
        if (data == (void *) -1) {
                perror("shmat");
                return NULL;
@@ -2109,7 +2109,7 @@ static void run_threads(void)
                 * start created threads (TD_CREATED -> TD_RUNNING)
                 */
                for (i = 0; i < thread_number; i++) {
-                       struct thread_data *td = &threads[i];
+                       td = &threads[i];
 
                        if (td->runstate != TD_CREATED)
                                continue;
@@ -2124,7 +2124,7 @@ static void run_threads(void)
                }
 
                for (i = 0; i < thread_number; i++) {
-                       struct thread_data *td = &threads[i];
+                       td = &threads[i];
 
                        if (td->runstate != TD_RUNNING &&
                            td->runstate != TD_VERIFYING)