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@llnw.com>
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D11019
This commit is contained in:
Sean Bruno 2017-06-16 20:00:39 +00:00
parent c0fcb86aee
commit 4c26331158

View File

@ -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]);