Cannot compile code with nss headers and -Werror=strict-prototypes
Categories
(NSS :: Libraries, defect, P1)
Tracking
(Not tracked)
People
(Reporter: rrelyea, Assigned: rrelyea)
Details
Attachments
(1 file)
497 bytes,
patch
|
kjacobs
:
review+
|
Details | Diff | Splinter Review |
Description of problem:
The latest upgrade of nss broke compilation with -Werror=strict-prototypes
Version-Release number of selected component (if applicable):
How reproducible:
Deterministic
Steps to Reproduce:
- dnf install -y gcc nss-devel
- cat >test.c <<EOF
#include <nss.h>
#include <sechash.h>
#include <pk11func.h>
EOF - gcc
pkg-config --cflags nss
-c -Wstrict-prototypes -Werror=strict-prototypes test.c
Actual results:
sh-5.0$ gcc pkg-config --cflags nss
-c -Wstrict-prototypes -Werror=strict-prototypes test.c
In file included from /usr/include/nss3/pk11func.h:12,
from test.c:3:
/usr/include/nss3/pk11pub.h:951:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
951 | int SECMOD_GetSystemFIPSEnabled();
| ^~~
cc1: some warnings being treated as errors
sh-5.0$ echo $?
1
Expected results:
sh-5.0$ gcc pkg-config --cflags nss
-c -Wstrict-prototypes -Werror=strict-prototypes test.c
sh-5.0$ echo $?
0
Additional info:
Looks like it was newly added function.
sh-5.0$ grep -RniI SECMOD_GetSystemFIPSEnabled /usr/include/
sh-5.0$ rpm -q nss-devel
nss-devel-3.52.0-2.fc33.x86_64
And simple workaround is to run following command as root
sed -e '/SECMOD_GetSystemFIPSEnabled/s/();/(void);/' -i /usr/include/nss3/pk11pub.h
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Description
•