diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2015-05-19 21:22:35 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2015-05-19 21:22:35 +0000 |
commit | 3bb59731595c4db5427812e41856930bbd012d82 (patch) | |
tree | 52543b9e6dd28fb1766d3ccc89bc55e45808c7ea | |
parent | b81c7a32729459e9327c6c1d29ee3f6f4cf03208 (diff) |
Fix compiler warnings.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12644 a1ca3aef-8c08-0410-bb20-df032aa958be
-rw-r--r-- | cgi-bin/help-index.c | 4 | ||||
-rw-r--r-- | scheduler/testlpd.c | 6 | ||||
-rw-r--r-- | test/ipptool.c | 7 |
3 files changed, 6 insertions, 11 deletions
diff --git a/cgi-bin/help-index.c b/cgi-bin/help-index.c index 2774437d4..42b4ab910 100644 --- a/cgi-bin/help-index.c +++ b/cgi-bin/help-index.c @@ -3,7 +3,7 @@ * * Online help index routines for CUPS. * - * Copyright 2007-2014 by Apple Inc. + * Copyright 2007-2015 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -1220,7 +1220,7 @@ help_new_node(const char *filename, /* I - Filename */ n->filename = strdup(filename); n->anchor = anchor ? strdup(anchor) : NULL; - n->section = (section && *section) ? strdup(section) : NULL; + n->section = *section ? strdup(section) : NULL; n->text = strdup(text); n->mtime = mtime; n->offset = offset; diff --git a/scheduler/testlpd.c b/scheduler/testlpd.c index 67019c375..ecfdb197b 100644 --- a/scheduler/testlpd.c +++ b/scheduler/testlpd.c @@ -3,7 +3,7 @@ * * cups-lpd test program for CUPS. * - * Copyright 2007-2014 by Apple Inc. + * Copyright 2007-2015 by Apple Inc. * Copyright 2006 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -447,7 +447,7 @@ status_long(int outfd, /* I - Command file descriptor */ * Send the "send short status" command... */ - if (args) + if (args[0]) snprintf(command, sizeof(command), "\004%s %s\n", dest, args[0]); else snprintf(command, sizeof(command), "\004%s\n", dest); @@ -490,7 +490,7 @@ status_short(int outfd, /* I - Command file descriptor */ * Send the "send short status" command... */ - if (args) + if (args[0]) snprintf(command, sizeof(command), "\003%s %s\n", dest, args[0]); else snprintf(command, sizeof(command), "\003%s\n", dest); diff --git a/test/ipptool.c b/test/ipptool.c index 22eecc859..156385437 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -3516,7 +3516,7 @@ expand_variables(_cups_vars_t *vars, /* I - Variables */ value = getenv(temp); src += tempptr - temp + 5; } - else if (vars) + else { if (src[1] == '{') { @@ -3563,11 +3563,6 @@ expand_variables(_cups_vars_t *vars, /* I - Variables */ src += tempptr - temp + 1; } - else - { - value = "$"; - src ++; - } if (value) { |