]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r320009,r347075:
authorngie <ngie@FreeBSD.org>
Wed, 15 May 2019 07:51:30 +0000 (07:51 +0000)
committerngie <ngie@FreeBSD.org>
Wed, 15 May 2019 07:51:30 +0000 (07:51 +0000)
commit7eedf31af1197dea0f3a4ff4aa15c2d7581925bf
tree9414ae9b7e8371af1bef7db1fb8c4cf1038ad006
parentbdae1ebe0461cacb3b6f0bba89dd45829a243668
MFC r320009,r347075:

r320009 (by sbruno):

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

r347075:

Fix `clang -Wcast-qual` issues

Remove unnecessary `char*` casting for arguments passed to `cget*(3)`, and
deconst `_PATH_PRINTCAP` before passing it to `cget*` via the `printcapdb`
variable.

This unblocks ^/projects/runtime-coverage-v2 from building cleanly on
universe13a.freebsd.org. I suspect the issue was introduced through some
changes to `bsd.*.mk` inclusion on the branch, which I will continue to
investigate/isolate.

Tested with: clang 8 (arm64)
usr.sbin/lpr/common_source/printcap.c
usr.sbin/lpr/lpc/lpc.c