Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmlSecNssGetInternalKeySlot function arguments missing #627

Closed
ryandesign opened this issue Apr 13, 2023 · 5 comments
Closed

xmlSecNssGetInternalKeySlot function arguments missing #627

ryandesign opened this issue Apr 13, 2023 · 5 comments

Comments

@ryandesign
Copy link

Building xmlsec 1.3.0 with clang 15 fails:

crypto.c:415:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
xmlSecNssGetInternalKeySlot()
                           ^
                            void
1 error generated.
make[3]: *** [libxmlsec1_nss_la-crypto.lo] Error 1 

The problem is that you haven't declared xmlSecNssGetInternalKeySlot's arguments:

xmlsec/src/nss/crypto.c

Lines 414 to 415 in 7296990

PK11SlotInfo *
xmlSecNssGetInternalKeySlot()

If this is to be a function that takes no arguments, you must declare it as such:

--- src/nss/crypto.c.orig	2023-04-12 11:45:12.000000000 -0500
+++ src/nss/crypto.c	2023-04-13 02:05:19.000000000 -0500
@@ -412,7 +412,7 @@
  * Returns: internal key slot and initializes it if needed.
  */
 PK11SlotInfo *
-xmlSecNssGetInternalKeySlot()
+xmlSecNssGetInternalKeySlot(void)
 {
     PK11SlotInfo *slot = NULL;
     SECStatus rv;

This was reported to MacPorts here: https://trac.macports.org/ticket/67227

lsh123 added a commit that referenced this issue Apr 13, 2023
@lsh123 lsh123 mentioned this issue Apr 13, 2023
@lsh123
Copy link
Owner

lsh123 commented Apr 13, 2023

Thanks, I wonder why macosx build in github actions didn't catch it.

@lsh123 lsh123 closed this as completed Apr 13, 2023
lsh123 added a commit that referenced this issue Apr 13, 2023
@ryandesign
Copy link
Author

ryandesign commented Apr 14, 2023

I wonder why macosx build in github actions didn't catch it.

This warning (which you turn into an error) is new in clang 15. Xcode 14.3 is the first version whose clang is based on clang 15. Xcode 14.3 requires macOS 13 or later. Your GitHub Actions configuration file uses macOS 12. GitHub Actions does not have a macOS 13 runner yet; see actions/runner-images#6426.

@lsh123
Copy link
Owner

lsh123 commented Apr 14, 2023

thanks for looking into it! I will switch to the mac-13 as soon as it is available!

@ryandesign
Copy link
Author

FYI it's available now.

@lsh123
Copy link
Owner

lsh123 commented May 4, 2023

Thanks, PR #651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants