From: msweet Date: Tue, 19 May 2015 21:22:35 +0000 (+0000) Subject: Fix compiler warnings. X-Git-Tag: v2.2b1~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bb59731595c4db5427812e41856930bbd012d82;p=thirdparty%2Fcups.git Fix compiler warnings. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12644 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/cgi-bin/help-index.c b/cgi-bin/help-index.c index 2774437d47..42b4ab9109 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 67019c3755..ecfdb197b1 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 22eecc8591..1563854379 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) {