[Bug 268334] security/cracklib: fix build with clang 15

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 12 Dec 2022 15:14:17 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268334

            Bug ID: 268334
           Summary: security/cracklib: fix build with clang 15
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: cy@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(cy@FreeBSD.org)
          Assignee: cy@FreeBSD.org

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.