Skip to content

Commit

Permalink
Don't assign values that are never used
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastien GODARD <[email protected]>
  • Loading branch information
sysstat committed Feb 23, 2023
1 parent 76b3e1f commit 8100151
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion count.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ __nr_t get_filesystem_nr(void)
char line[512], fs_name[MAX_FS_LEN], mountp[256], type[128];
char *pos = 0, *pos2 = 0;
__nr_t fs = 0;
int skip = 0, skip_next = 0;
int skip, skip_next = 0;
struct statvfs buf;

if ((fp = fopen(MTAB, "r")) == NULL)
Expand Down
1 change: 0 additions & 1 deletion json_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ __print_funct_t json_print_memory_stats(struct activity *a, int curr, int tab,
if (sep) {
printf(", ");
}
sep = TRUE;

printf("\"swpfree\": %llu, "
"\"swpused\": %llu, "
Expand Down
8 changes: 4 additions & 4 deletions pcp_def_metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ void pcp_def_huge_metrics()
void pcp_def_pwr_fan_metrics(struct activity *a)
{
#ifdef HAVE_PCP
int inst = 0;
int inst;
static pmInDom indom = PM_INDOM_NULL;
char buf[16];

Expand Down Expand Up @@ -1597,7 +1597,7 @@ void pcp_def_pwr_fan_metrics(struct activity *a)
void pcp_def_pwr_temp_metrics(struct activity *a)
{
#ifdef HAVE_PCP
int inst = 0;
int inst;
static pmInDom indom = PM_INDOM_NULL;
char buf[16];

Expand Down Expand Up @@ -1636,7 +1636,7 @@ void pcp_def_pwr_temp_metrics(struct activity *a)
void pcp_def_pwr_in_metrics(struct activity *a)
{
#ifdef HAVE_PCP
int inst = 0;
int inst;
static pmInDom indom = PM_INDOM_NULL;
char buf[16];

Expand Down Expand Up @@ -1711,7 +1711,7 @@ void pcp_def_pwr_bat_metrics(struct activity *a)
void pcp_def_pwr_usb_metrics(struct activity *a)
{
#ifdef HAVE_PCP
int inst = 0;
int inst;
static pmInDom indom = PM_INDOM_NULL;
char buf[16];

Expand Down
4 changes: 2 additions & 2 deletions rd_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ __nr_t read_kernel_tables(struct stats_ktables *st_ktables)
{
FILE *fp;
unsigned long long parm;
int rc = 0;
int rc;

/* Open /proc/sys/fs/dentry-state file */
if ((fp = fopen(FDENTRY_STATE, "r")) != NULL) {
Expand Down Expand Up @@ -2592,7 +2592,7 @@ __nr_t read_filesystem(struct stats_filesystem *st_filesystem, __nr_t nr_alloc)
{
FILE *fp;
char line[512], fs_name[MAX_FS_LEN], mountp[256], type[128];
int skip = 0, skip_next = 0, fs;
int skip, skip_next = 0, fs;
char *pos = 0, *pos2 = 0;
__nr_t fs_read = 0;
struct stats_filesystem *st_filesystem_i;
Expand Down
2 changes: 1 addition & 1 deletion sadf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ void logic2_display_loop(int ifd, char *file, struct file_activity *file_actlst,
{
int i, p;
int curr = 1, rtype;
int eosaf = TRUE, reset = FALSE;
int eosaf = TRUE, reset;
long cnt = 1;

/* Read system statistics from file */
Expand Down
2 changes: 1 addition & 1 deletion sadf_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ __printf_funct_t print_svg_header(void *parm, int action, char *dfile, char *my_
struct svg_hdr_parm *hdr_parm = (struct svg_hdr_parm *) parm;
struct tm rectime;
time_t t = file_hdr->sa_ust_time;
unsigned int height = 0, ht = 0;
unsigned int height, ht = 0;
int i, p;

if (action & F_BEGIN) {
Expand Down

0 comments on commit 8100151

Please sign in to comment.