Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2022 18:38:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 268417] devel/libcbor: fix strict prototype warnings with clang 15
Message-ID:  <bug-268417-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268417

            Bug ID: 268417
           Summary: devel/libcbor: fix strict prototype warnings with
                    clang 15
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: sunpoet@FreeBSD.org
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)

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

  In file included from
/wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/aes256.c:8:
  In file included from
/wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/fido.h:42:
  In file included from /usr/local/include/cbor.h:14:
  /usr/local/include/cbor/arrays.h:100:51: error: a function declaration
without a prototype is deprecated in all versions of C
[-Werror,-Wstrict-prototypes]
  CBOR_EXPORT cbor_item_t* cbor_new_indefinite_array();
                                                    ^
                                                     void
  In file included from
/wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/aes256.c:8:
  In file included from
/wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/fido.h:42:
  In file included from /usr/local/include/cbor.h:15:
  /usr/local/include/cbor/bytestrings.h:107:54: error: a function declarati=
on
without a prototype is deprecated in all versions of C
[-Werror,-Wstrict-prototypes]
  CBOR_EXPORT cbor_item_t *cbor_new_definite_bytestring();
                                                       ^
                                                        void

And many more of these -Werror warnings, all due to declarations in libcbor=
's
headers. These are triggered because functions taking no parameters should =
be
declared with "(void)", not "()".

I would like to propose to fix the problem on the libcbor side, by editing =
the
declarations and definitions of such functions in the port Makefile. This
cleans up all warnings in devel/libcbor, and also fixes security/libfido2 a=
s a
consequence.

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



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