Remove unused parameters passed to functions
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 21 Oct 2017 15:03:51 +0000 (17:03 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 21 Oct 2017 15:03:51 +0000 (17:03 +0200)
Some variables were passed to functions but unused by them. So remove
them.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
pidstat.c
pr_stats.c
sa.h
sa_common.c
sadf.c
sar.c

index 5be7a43455b4eb3d5f6e8eb4253011d8e11e728e..bfb7a4c4d4f74004933eefa3b1a0dd7ac61217fa 100644 (file)
--- a/pidstat.c
+++ b/pidstat.c
@@ -1561,7 +1561,6 @@ int write_pid_task_all_stats(int prev, int curr, int dis,
  *             the timestamp of the previous sample.
  * @curr_string        String displayed at the beginning of current sample stats.
  *             This is the timestamp of the current sample.
- * @itv                Interval of time.
  *
  * RETURNS:
  * 0 if all the processes to display have terminated.
@@ -1569,8 +1568,7 @@ int write_pid_task_all_stats(int prev, int curr, int dis,
  ***************************************************************************
  */
 int write_pid_child_all_stats(int prev, int curr, int dis,
-                             char *prev_string, char *curr_string,
-                             unsigned long long itv)
+                             char *prev_string, char *curr_string)
 {
        struct pid_stats *pstc, *pstp;
        unsigned int p;
@@ -1947,7 +1945,6 @@ int write_pid_child_memory_stats(int prev, int curr, int dis, int disp_avg,
  * @curr_string        String displayed at the beginning of current sample stats.
  *             This is the timestamp of the current sample, or "Average"
  *             when displaying average stats.
- * @itv                Interval of time.
  *
  * RETURNS:
  * 0 if all the processes to display have terminated.
@@ -1955,8 +1952,7 @@ int write_pid_child_memory_stats(int prev, int curr, int dis, int disp_avg,
  ***************************************************************************
  */
 int write_pid_stack_stats(int prev, int curr, int dis, int disp_avg,
-                         char *prev_string, char *curr_string,
-                         unsigned long long itv)
+                         char *prev_string, char *curr_string)
 {
        struct pid_stats *pstc, *pstp;
        unsigned int p;
@@ -2160,7 +2156,6 @@ int write_pid_ctxswitch_stats(int prev, int curr, int dis,
  * @curr_string        String displayed at the beginning of current sample stats.
  *             This is the timestamp of the current sample, or "Average"
  *             when displaying average stats.
- * @itv                Interval of time.
  *
  * RETURNS:
  * 0 if all the processes to display have terminated.
@@ -2168,8 +2163,7 @@ int write_pid_ctxswitch_stats(int prev, int curr, int dis,
  ***************************************************************************
  */
 int write_pid_rt_stats(int prev, int curr, int dis,
-                      char *prev_string, char *curr_string,
-                      unsigned long long itv)
+                      char *prev_string, char *curr_string)
 {
        struct pid_stats *pstc, *pstp;
        unsigned int p;
@@ -2212,7 +2206,6 @@ int write_pid_rt_stats(int prev, int curr, int dis,
  * @curr_string        String displayed at the beginning of current sample stats.
  *             This is the timestamp of the current sample, or "Average"
  *             when displaying average stats.
- * @itv                Interval of time.
  *
  * RETURNS:
  * 0 if all the processes to display have terminated.
@@ -2220,8 +2213,7 @@ int write_pid_rt_stats(int prev, int curr, int dis,
  ***************************************************************************
  */
 int write_pid_ktab_stats(int prev, int curr, int dis, int disp_avg,
-                        char *prev_string, char *curr_string,
-                        unsigned long long itv)
+                        char *prev_string, char *curr_string)
 {
        struct pid_stats *pstc, *pstp;
        unsigned int p;
@@ -2325,8 +2317,7 @@ int write_stats_core(int prev, int curr, int dis, int disp_avg,
                                                          itv, deltot_jiffies);
                }
                if (DISPLAY_CHILD_STATS(tskflag)) {
-                       again += write_pid_child_all_stats(prev, curr, dis, prev_string, curr_string,
-                                                          itv);
+                       again += write_pid_child_all_stats(prev, curr, dis, prev_string, curr_string);
                }
        }
        else {
@@ -2360,7 +2351,7 @@ int write_stats_core(int prev, int curr, int dis, int disp_avg,
                /* Display stack stats */
                if (DISPLAY_STACK(actflag)) {
                        again += write_pid_stack_stats(prev, curr, dis, disp_avg,
-                                                      prev_string, curr_string, itv);
+                                                      prev_string, curr_string);
                }
 
                /* Display I/O stats */
@@ -2378,13 +2369,12 @@ int write_stats_core(int prev, int curr, int dis, int disp_avg,
                /* Display kernel table stats */
                if (DISPLAY_KTAB(actflag)) {
                        again += write_pid_ktab_stats(prev, curr, dis, disp_avg,
-                                                     prev_string, curr_string, itv);
+                                                     prev_string, curr_string);
                }
 
                /* Display scheduling priority and policy information */
                if (DISPLAY_RT(actflag)) {
-                       again += write_pid_rt_stats(prev, curr, dis, prev_string,
-                                                   curr_string, itv);
+                       again += write_pid_rt_stats(prev, curr, dis, prev_string, curr_string);
                }
        }
 
index c8a229f845a029a2c75a313fe8a9eb4246761102..d81fb59abf6da2cd19c10c423684b30c7b3ce419 100644 (file)
@@ -487,12 +487,10 @@ __print_funct_t print_io_stats(struct activity *a, int prev, int curr,
  * @a          Activity structure with statistics.
  * @prev       Index in array where stats used as reference are.
  * @curr       Index in array for current sample statistics.
- * @itv                Interval of time in 1/100th of a second.
  * @dispavg    TRUE if displaying average statistics.
  ***************************************************************************
  */
-void stub_print_memory_stats(struct activity *a, int prev, int curr,
-                            unsigned long long itv, int dispavg)
+void stub_print_memory_stats(struct activity *a, int prev, int curr, int dispavg)
 {
        struct stats_memory
                *smc = (struct stats_memory *) a->buf[curr];
@@ -699,7 +697,7 @@ void stub_print_memory_stats(struct activity *a, int prev, int curr,
 __print_funct_t print_memory_stats(struct activity *a, int prev, int curr,
                                   unsigned long long itv)
 {
-       stub_print_memory_stats(a, prev, curr, itv, FALSE);
+       stub_print_memory_stats(a, prev, curr, FALSE);
 }
 
 /*
@@ -716,7 +714,7 @@ __print_funct_t print_memory_stats(struct activity *a, int prev, int curr,
 __print_funct_t print_avg_memory_stats(struct activity *a, int prev, int curr,
                                       unsigned long long itv)
 {
-       stub_print_memory_stats(a, prev, curr, itv, TRUE);
+       stub_print_memory_stats(a, prev, curr, TRUE);
 }
 
 /*
@@ -2543,7 +2541,6 @@ void print_pwr_wghfreq_stats(struct activity *a, int prev, int curr,
  * IN:
  * @a          Activity structure with statistics.
  * @curr       Index in array for current sample statistics.
- * @itv                Interval of time in 1/100th of a second.
  * @dispavg    TRUE if displaying average statistics.
  ***************************************************************************
  */
diff --git a/sa.h b/sa.h
index a09bfd1897e1ed2d0061d71220413c45d8d44cbc..b784c42a686aa069635ba30071c68c95085be39d 100644 (file)
--- a/sa.h
+++ b/sa.h
@@ -1200,8 +1200,7 @@ char *get_devname
 void get_file_timestamp_struct
        (unsigned int, struct tm *, struct file_header *);
 void get_itv_value
-       (struct record_header *, struct record_header *, unsigned int,
-        unsigned long long *);
+       (struct record_header *, struct record_header *, unsigned long long *);
 void handle_invalid_sa_file
        (int *, struct file_magic *, char *, int);
 int next_slice
index b5796b675b05da3baee0922d7c036e3bdfd8d789..69ad81c06fb68d19ab81c91866d26a8cfe2927e2 100644 (file)
@@ -502,7 +502,6 @@ int check_alt_sa_dir(char *datafile, int d_off, int sa_name)
  * IN:
  * @record_hdr_curr    Record with current sample statistics.
  * @record_hdr_prev    Record with previous sample statistics.
- * @nr_proc            Number of CPU, including CPU "all".
  *
  * OUT:
  * @itv                        Interval of time in 1/100th of a second.
@@ -510,7 +509,7 @@ int check_alt_sa_dir(char *datafile, int d_off, int sa_name)
  */
 void get_itv_value(struct record_header *record_hdr_curr,
                   struct record_header *record_hdr_prev,
-                  unsigned int nr_proc, unsigned long long *itv)
+                  unsigned long long *itv)
 {
        /* Interval value in jiffies */
        *itv = get_interval(record_hdr_prev->uptime_cs,
diff --git a/sadf.c b/sadf.c
index ce84a637461521352bb6252cf08b64b867cadd58..c559f57ee530464aa146d965911a169d4aa328eb 100644 (file)
--- a/sadf.c
+++ b/sadf.c
@@ -656,8 +656,7 @@ int generic_write_stats(int curr, int use_tm_start, int use_tm_end, int reset,
                return 0;
 
        /* Get interval values in 1/100th of a second */
-       get_itv_value(&record_hdr[curr], &record_hdr[!curr],
-                     cpu_nr, &itv);
+       get_itv_value(&record_hdr[curr], &record_hdr[!curr], &itv);
 
        /* Check time (3) */
        if (use_tm_end && (datecmp(loctime, &tm_end) > 0)) {
diff --git a/sar.c b/sar.c
index 2c92c3e380f3d3e8d438b947b72eb220f0aa3128..f2306b0927a4d615bc9e8a43fc277c48d2e66d43 100644 (file)
--- a/sar.c
+++ b/sar.c
@@ -481,8 +481,7 @@ int write_stats(int curr, int read_from_file, long *cnt, int use_tm_start,
                return 0;
 
        /* Get interval value in 1/100th of a second */
-       get_itv_value(&record_hdr[curr], &record_hdr[!curr],
-                     cpu_nr, &itv);
+       get_itv_value(&record_hdr[curr], &record_hdr[!curr], &itv);
 
        /* Check time (3) */
        if (use_tm_end && (datecmp(&rectime, &tm_end) > 0)) {