svn commit: r320009 - head/usr.sbin/lpr/lpc
Sean Bruno
sbruno at FreeBSD.org
Fri Jun 16 20:00:40 UTC 2017
Author: sbruno
Date: Fri Jun 16 20:00:39 2017
New Revision: 320009
URL: https://svnweb.freebsd.org/changeset/base/320009
Log:
Quiesce clang warning while building lpc.
usr.sbin/lpr/lpc/lpc.c
Warning
passing 'char *[20]' to parameter of type 'const char **' discards
qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]
Fix:
Explicitly cast the variable "margv" to const char ** only for it's
use as a parameter to suppress the error
Submitted by: Aaron Prieger <aprieger at llnw.com>
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D11019
Modified:
head/usr.sbin/lpr/lpc/lpc.c
Modified: head/usr.sbin/lpr/lpc/lpc.c
==============================================================================
--- head/usr.sbin/lpr/lpc/lpc.c Fri Jun 16 19:26:33 2017 (r320008)
+++ head/usr.sbin/lpr/lpc/lpc.c Fri Jun 16 20:00:39 2017 (r320009)
@@ -197,7 +197,7 @@ cmdscanner(void)
makeargv();
if (margc == 0)
continue;
- if (el != NULL && el_parse(el, margc, margv) != -1)
+ if (el != NULL && el_parse(el, margc, (const char **)margv) != -1)
continue;
c = getcmd(margv[0]);
More information about the svn-src-head
mailing list