From: Christian Grothoff Date: Sat, 24 Nov 2012 22:43:19 +0000 (+0000) Subject: adding missing parens around macro arguments in gauger macros X-Git-Tag: initial-import-from-subversion-38251~10723 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8a5f6d9ccecf75d0faf56dd0d3b6c48a9041275d;p=oweals%2Fgnunet.git adding missing parens around macro arguments in gauger macros --- diff --git a/src/include/gauger.h b/src/include/gauger.h index 5113e18b5..10ada9065 100644 --- a/src/include/gauger.h +++ b/src/include/gauger.h @@ -29,14 +29,14 @@ sprintf(__gauger_s,"%Lf", (long double) (value));\ __gauger_v[0] = "gauger";\ __gauger_v[1] = "-n";\ - __gauger_v[2] = (char*) counter; \ + __gauger_v[2] = (char*) (counter); \ __gauger_v[3] = "-d";\ __gauger_v[4] = __gauger_s;\ __gauger_v[5] = "-u";\ - __gauger_v[6] = (char*) unit; \ + __gauger_v[6] = (char*) (unit); \ __gauger_v[7] = "-c";\ - __gauger_v[8] = (char*) category; \ - __gauger_v[9] = (char *)NULL;\ + __gauger_v[8] = (char*) (category); \ + __gauger_v[9] = (char*) NULL;\ execvp("gauger",__gauger_v);\ _exit(1);\ }else{\ @@ -59,23 +59,23 @@ sprintf(__gauger_s,"%Lf", (long double) (value));\ __gauger_v[0] = "gauger";\ __gauger_v[1] = "-n";\ - __gauger_v[2] = (char*) counter; \ + __gauger_v[2] = (char*) (counter); \ __gauger_v[3] = "-d";\ __gauger_v[4] = __gauger_s;\ __gauger_v[5] = "-u";\ - __gauger_v[6] = (char*) unit; \ + __gauger_v[6] = (char*) (unit); \ __gauger_v[7] = "-i";\ __gauger_v[8] = id;\ __gauger_v[9] = "-c";\ - __gauger_v[10] = (char *) category; \ - __gauger_v[11] = (char *)NULL;\ + __gauger_v[10] = (char *) (category); \ + __gauger_v[11] = (char *) NULL;\ execvp("gauger",__gauger_v);\ _exit(1);\ }else{\ _exit(0);\ }\ }else{\ - waitpid(__gauger_p,NULL,0);\ + waitpid(__gauger_p, NULL, 0);\ }\ } @@ -90,7 +90,7 @@ char __gauger_commandline[MAX_PATH];\ \ snprintf (__gauger_commandline, MAX_PATH, "gauger.py -n \"%s\" -d \"%Lf\" -u \"%s\" -c \"%s\"",\ - counter, (long double) (value), unit, category);\ + (counter), (long double) (value), (unit), (category)); \ __gauger_commandline[MAX_PATH - 1] = '\0';\ system (__gauger_commandline);\ } @@ -100,7 +100,7 @@ char __gauger_commandline[MAX_PATH];\ \ snprintf (__gauger_commandline, MAX_PATH, "gauger.py -n \"%s\" -d \"%Lf\" -u \"%s\" -i \"%s\" -c \"%s\"",\ - counter, (long double) (value), unit, id, category);\ + (counter), (long double) (value), (unit), (id), (category)); \ __gauger_commandline[MAX_PATH - 1] = '\0';\ system (__gauger_commandline);\ }