Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jun 2017 20:00:39 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320009 - head/usr.sbin/lpr/lpc
Message-ID:  <201706162000.v5GK0diU035518@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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]);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706162000.v5GK0diU035518>