HomeFreeBSD

security/cracklib: fix build with clang 15

Description

security/cracklib: fix build with clang 15

During an exp-run for llvm 15 (see bug 265425), it turned out that
security/cracklib failed to build with clang 15:

rules.c:346:50: warning: too few arguments in call to 'Debug'
        Debug(1, "MatchClass: unknown class %c\n", class);
        ~~~~~                                           ^
rules.c:346:45: error: incompatible integer to pointer conversion passing 'char' to parameter of type 'char *'; take the address with & [-Wint-conversion]
        Debug(1, "MatchClass: unknown class %c\n", class);
                                                   ^~~~~
                                                   &

This is because cracklib is very old K&R source, and the Debug()
function is not defined with varargs, but an arbitrary amount of char
pointer arguments.

Since the Debug() function does nothing anyway, define it as a varargs
macro instead. This also gets rid of most of the other compilation
warnings.

PR: 268334
Approved by: cy (maintainer)
MFH: 2022Q4

Details

Provenance
dimAuthored on Dec 12 2022, 3:09 PM
Parents
R11:c7823054d431: x11-toolkits/pangox-compat: fix build with clang 15
Branches
Unknown
Tags
Unknown