aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-12-01 03:26:40 +0100
committerMattias Andrée <maandree@kth.se>2016-12-01 03:26:40 +0100
commit3304923d8b520746bf03ffadb27b7feeb7229891 (patch)
tree89d09f3f38b5ed95d0821b0afed0f9e0a304e1f9
parentFix warnings (diff)
downloadcg-tools-3304923d8b520746bf03ffadb27b7feeb7229891.tar.gz
cg-tools-3304923d8b520746bf03ffadb27b7feeb7229891.tar.bz2
cg-tools-3304923d8b520746bf03ffadb27b7feeb7229891.tar.xz
Fix -Wshadow warning
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--src/cg-brilliance.c8
-rw-r--r--src/cg-darkroom.c8
-rw-r--r--src/cg-gamma.c8
-rw-r--r--src/cg-icc.c8
-rw-r--r--src/cg-limits.c8
-rw-r--r--src/cg-negative.c8
-rw-r--r--src/cg-rainbow.c8
-rw-r--r--src/cg-sleepmode.c8
8 files changed, 32 insertions, 32 deletions
diff --git a/src/cg-brilliance.c b/src/cg-brilliance.c
index 0e631d0..2039cdc 100644
--- a/src/cg-brilliance.c
+++ b/src/cg-brilliance.c
@@ -146,13 +146,13 @@ static int parse_double(double* restrict out, const char* restrict str)
* @param argv `NULL` terminated list of unparsed arguments
* @param method The argument associated with the "-M" option
* @param site The argument associated with the "-S" option
- * @param crtcs The arguments associated with the "-c" options, `NULL`-terminated
+ * @param crtcs_ The arguments associated with the "-c" options, `NULL`-terminated
* @param prio The argument associated with the "-p" option
* @param rule The argument associated with the "-R" option
* @return Zero on success, -1 on error
*/
int handle_args(int argc, char* argv[], char* method, char* site,
- char** crtcs, char* prio, char* rule)
+ char** crtcs_, char* prio, char* rule)
{
char* red;
char* green;
@@ -161,8 +161,8 @@ int handle_args(int argc, char* argv[], char* method, char* site,
q += (method != NULL) && !strcmp(method, "?");
q += (prio != NULL) && !strcmp(prio, "?");
q += (rule != NULL) && (!strcmp(rule, "?") || !strcmp(rule, "??"));
- for (; *crtcs; crtcs++)
- q += !strcmp(*crtcs, "?");
+ for (; *crtcs_; crtcs_++)
+ q += !strcmp(*crtcs_, "?");
if ((q > 1) || (xflag && (prio != NULL || argc)))
usage();
if (argc == 1)
diff --git a/src/cg-darkroom.c b/src/cg-darkroom.c
index bd677c7..e9e1b2a 100644
--- a/src/cg-darkroom.c
+++ b/src/cg-darkroom.c
@@ -136,20 +136,20 @@ static int parse_double(double* restrict out, const char* restrict str)
* @param argv `NULL` terminated list of unparsed arguments
* @param method The argument associated with the "-M" option
* @param site The argument associated with the "-S" option
- * @param crtcs The arguments associated with the "-c" options, `NULL`-terminated
+ * @param crtcs_ The arguments associated with the "-c" options, `NULL`-terminated
* @param prio The argument associated with the "-p" option
* @param rule The argument associated with the "-R" option
* @return Zero on success, -1 on error
*/
int handle_args(int argc, char* argv[], char* method, char* site,
- char** crtcs, char* prio, char* rule)
+ char** crtcs_, char* prio, char* rule)
{
int q = xflag + dflag;
q += (method != NULL) && !strcmp(method, "?");
q += (prio != NULL) && !strcmp(prio, "?");
q += (rule != NULL) && (!strcmp(rule, "?") || !strcmp(rule, "??"));
- for (; *crtcs; crtcs++)
- q += !strcmp(*crtcs, "?");
+ for (; *crtcs_; crtcs_++)
+ q += !strcmp(*crtcs_, "?");
if ((q > 1) || (xflag && (prio != NULL || argc)))
usage();
if (argc == 1)
diff --git a/src/cg-gamma.c b/src/cg-gamma.c
index b8df95d..2894f71 100644
--- a/src/cg-gamma.c
+++ b/src/cg-gamma.c
@@ -376,21 +376,21 @@ static int parse_gamma_file(const char* restrict pathname)
* @param argv `NULL` terminated list of unparsed arguments
* @param method The argument associated with the "-M" option
* @param site The argument associated with the "-S" option
- * @param crtcs The arguments associated with the "-c" options, `NULL`-terminated
+ * @param crtcs_ The arguments associated with the "-c" options, `NULL`-terminated
* @param prio The argument associated with the "-p" option
* @param rule The argument associated with the "-R" option
* @return Zero on success, -1 on error
*/
int handle_args(int argc, char* argv[], char* method, char* site,
- char** crtcs, char* prio, char* rule)
+ char** crtcs_, char* prio, char* rule)
{
int free_fflag = 0, saved_errno;
int q = xflag + dflag;
q += (method != NULL) && !strcmp(method, "?");
q += (prio != NULL) && !strcmp(prio, "?");
q += (rule != NULL) && (!strcmp(rule, "?") || !strcmp(rule, "??"));
- for (; *crtcs; crtcs++)
- q += !strcmp(*crtcs, "?");
+ for (; *crtcs_; crtcs_++)
+ q += !strcmp(*crtcs_, "?");
if ((q > 1) || (fflag && argc) || (xflag && ((fflag != NULL) || (argc > 0) || (prio != NULL))))
usage();
if (argc == 1)
diff --git a/src/cg-icc.c b/src/cg-icc.c
index 9396b71..d3dffe9 100644
--- a/src/cg-icc.c
+++ b/src/cg-icc.c
@@ -317,13 +317,13 @@ static int load_icc_table(int fd, const char *dirname)
* @param argv `NULL` terminated list of unparsed arguments
* @param method The argument associated with the "-M" option
* @param site The argument associated with the "-S" option
- * @param crtcs The arguments associated with the "-c" options, `NULL`-terminated
+ * @param crtcs_ The arguments associated with the "-c" options, `NULL`-terminated
* @param prio The argument associated with the "-p" option
* @param rule The argument associated with the "-R" option
* @return Zero on success, -1 on error
*/
int handle_args(int argc, char* argv[], char* method, char* site,
- char** crtcs, char* prio, char* rule)
+ char** crtcs_, char* prio, char* rule)
{
struct passwd* pw;
char* path = NULL;
@@ -332,8 +332,8 @@ int handle_args(int argc, char* argv[], char* method, char* site,
q += (method != NULL) && !strcmp(method, "?");
q += (prio != NULL) && !strcmp(prio, "?");
q += (rule != NULL) && (!strcmp(rule, "?") || !strcmp(rule, "??"));
- for (; *crtcs; crtcs++)
- q += !strcmp(*crtcs, "?");
+ for (; *crtcs_; crtcs_++)
+ q += !strcmp(*crtcs_, "?");
if ((q > 1) || (xflag && ((argc > 0) || (prio != NULL))) || (argc > 1))
usage();
icc_pathname = *argv;
diff --git a/src/cg-limits.c b/src/cg-limits.c
index 6a071c7..bf8ba83 100644
--- a/src/cg-limits.c
+++ b/src/cg-limits.c
@@ -485,21 +485,21 @@ static int parse_contrast_file(const char* restrict pathname)
* @param argv `NULL` terminated list of unparsed arguments
* @param method The argument associated with the "-M" option
* @param site The argument associated with the "-S" option
- * @param crtcs The arguments associated with the "-c" options, `NULL`-terminated
+ * @param crtcs_ The arguments associated with the "-c" options, `NULL`-terminated
* @param prio The argument associated with the "-p" option
* @param rule The argument associated with the "-R" option
* @return Zero on success, -1 on error
*/
int handle_args(int argc, char* argv[], char* method, char* site,
- char** crtcs, char* prio, char* rule)
+ char** crtcs_, char* prio, char* rule)
{
int free_Bflag = 0, free_Cflag = 0, saved_errno;
int q = xflag + dflag;
q += (method != NULL) && !strcmp(method, "?");
q += (prio != NULL) && !strcmp(prio, "?");
q += (rule != NULL) && (!strcmp(rule, "?") || !strcmp(rule, "??"));
- for (; *crtcs; crtcs++)
- q += !strcmp(*crtcs, "?");
+ for (; *crtcs_; crtcs_++)
+ q += !strcmp(*crtcs_, "?");
if ((q > 1) || (xflag && ((Bflag != NULL) || (Cflag != NULL) || (argc > 0) || (prio != NULL))))
usage();
if ((Bflag || Cflag) && argc)
diff --git a/src/cg-negative.c b/src/cg-negative.c
index 106c15c..73f7e8c 100644
--- a/src/cg-negative.c
+++ b/src/cg-negative.c
@@ -144,20 +144,20 @@ int handle_opt(char* opt, char* arg)
* @param argv `NULL` terminated list of unparsed arguments
* @param method The argument associated with the "-M" option
* @param site The argument associated with the "-S" option
- * @param crtcs The arguments associated with the "-c" options, `NULL`-terminated
+ * @param crtcs_ The arguments associated with the "-c" options, `NULL`-terminated
* @param prio The argument associated with the "-p" option
* @param rule The argument associated with the "-R" option
* @return Zero on success, -1 on error
*/
int handle_args(int argc, char* argv[], char* method, char* site,
- char** crtcs, char* prio, char* rule)
+ char** crtcs_, char* prio, char* rule)
{
int q = xflag + (dflag | rplus | gplus | bplus);
q += (method != NULL) && !strcmp(method, "?");
q += (prio != NULL) && !strcmp(prio, "?");
q += (rule != NULL) && (!strcmp(rule, "?") || !strcmp(rule, "??"));
- for (; *crtcs; crtcs++)
- q += !strcmp(*crtcs, "?");
+ for (; *crtcs_; crtcs_++)
+ q += !strcmp(*crtcs_, "?");
if (argc || (q > 1) || (xflag && (prio != NULL)))
usage();
return 0;
diff --git a/src/cg-rainbow.c b/src/cg-rainbow.c
index 35f9619..5f2a117 100644
--- a/src/cg-rainbow.c
+++ b/src/cg-rainbow.c
@@ -141,20 +141,20 @@ static int parse_double(double* restrict out, const char* restrict str)
* @param argv `NULL` terminated list of unparsed arguments
* @param method The argument associated with the "-M" option
* @param site The argument associated with the "-S" option
- * @param crtcs The arguments associated with the "-c" options, `NULL`-terminated
+ * @param crtcs_ The arguments associated with the "-c" options, `NULL`-terminated
* @param prio The argument associated with the "-p" option
* @param rule The argument associated with the "-R" option
* @return Zero on success, -1 on error
*/
int handle_args(int argc, char* argv[], char* method, char* site,
- char** crtcs, char* prio, char* rule)
+ char** crtcs_, char* prio, char* rule)
{
int q = (lflag || sflag);
q += (method != NULL) && !strcmp(method, "?");
q += (prio != NULL) && !strcmp(prio, "?");
q += (rule != NULL) && (!strcmp(rule, "?") || !strcmp(rule, "??"));
- for (; *crtcs; crtcs++)
- q += !strcmp(*crtcs, "?");
+ for (; *crtcs_; crtcs_++)
+ q += !strcmp(*crtcs_, "?");
if ((q > 1) || argc)
usage();
if (sflag != NULL)
diff --git a/src/cg-sleepmode.c b/src/cg-sleepmode.c
index bfa719a..6d0c12a 100644
--- a/src/cg-sleepmode.c
+++ b/src/cg-sleepmode.c
@@ -192,20 +192,20 @@ static int parse_double(double* restrict out, const char* restrict str)
* @param argv `NULL` terminated list of unparsed arguments
* @param method The argument associated with the "-M" option
* @param site The argument associated with the "-S" option
- * @param crtcs The arguments associated with the "-c" options, `NULL`-terminated
+ * @param crtcs_ The arguments associated with the "-c" options, `NULL`-terminated
* @param prio The argument associated with the "-p" option
* @param rule The argument associated with the "-R" option
* @return Zero on success, -1 on error
*/
int handle_args(int argc, char* argv[], char* method, char* site,
- char** crtcs, char* prio, char* rule)
+ char** crtcs_, char* prio, char* rule)
{
int q = (rflag || gflag || bflag || argc);
q += (method != NULL) && !strcmp(method, "?");
q += (prio != NULL) && !strcmp(prio, "?");
q += (rule != NULL) && (!strcmp(rule, "?") || !strcmp(rule, "??"));
- for (; *crtcs; crtcs++)
- q += !strcmp(*crtcs, "?");
+ for (; *crtcs_; crtcs_++)
+ q += !strcmp(*crtcs_, "?");
if ((q > 1) || (argc > 3))
usage();
if (rflag != NULL)