Closed Bug 1796504 Opened 2 years ago Closed 2 years ago

-Wdeprecated-non-prototype warnings in NSS

Categories

(NSS :: Build, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(2 files)

With clang 15, there are a bunch of new warnings, like

[task 2022-10-20T03:16:36.918Z] 03:16:36    ERROR -  lex.Pk11Install_yy.cpp(610,33): error: passing arguments to 'Pk11Install_yy_create_buffer' without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
[task 2022-10-20T03:16:36.918Z] 03:16:36     INFO -                  yy_create_buffer(yyin, YY_BUF_SIZE);
[task 2022-10-20T03:16:36.923Z] 03:16:36     INFO -                                  ^

or

[task 2022-10-20T03:16:38.484Z] 03:16:38    ERROR -  /builds/worker/checkouts/gecko/security/nss/lib/zlib/adler32.c(63,15): error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
[task 2022-10-20T03:16:38.484Z] 03:16:38     INFO -  uLong ZEXPORT adler32_z(adler, buf, len)
[task 2022-10-20T03:16:38.485Z] 03:16:38     INFO -                ^

The former comes from clang-cl not defining __STDC__ (but it does define __STDC_VERSION__).

The latter comes from the zlib source being using K&R style function definitions, and that being the warning trigger. In only happens on Windows because that's the only platform where we actually build this code.

However, in both cases, this is happening in code built for command line utilities we actually don't use in Firefox anymore, so we could just stop building them.

Blocks: 1795245

clang-cl doesn't define the latter.

shlibsign hasn't been used since bug 1620158. I'm not sure modutil was
ever actually used, but it was related included in relation to the .chk
signatures too, which we don't produce anymore.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: