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

autotools: silence gcc warnings in libtool code #15915

Closed
wants to merge 2 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Jan 5, 2025

Seen on Cygwin with gcc 12:

./.libs/lt-upload-pausing.c: In function 'lt_fatal':
./.libs/lt-upload-pausing.c:593:1: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
  593 | lt_fatal (const char *file, int line, const char *message, ...)
      | ^~~~~~~~

https://github.com/curl/curl/actions/runs/12611924141/job/35148104431?pr=15911#step:11:264

Ref: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wsuggest-attribute_003d

```
./.libs/lt-tls-session-reuse.c: In function 'lt_fatal':
./.libs/lt-tls-session-reuse.c:593:1: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
  593 | lt_fatal (const char *file, int line, const char *message, ...)
      | ^~~~~~~~
./.libs/lt-ws-data.c: In function 'lt_fatal':
./.libs/lt-ws-data.c:593:1: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
  593 | lt_fatal (const char *file, int line, const char *message, ...)
      | ^~~~~~~~
./.libs/lt-upload-pausing.c: In function 'lt_fatal':
./.libs/lt-upload-pausing.c:593:1: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
  593 | lt_fatal (const char *file, int line, const char *message, ...)
      | ^~~~~~~~
./.libs/lt-ws-pingpong.c: In function 'lt_fatal':
./.libs/lt-ws-pingpong.c:593:1: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
  593 | lt_fatal (const char *file, int line, const char *message, ...)
      | ^~~~~~~~
```
https://github.com/curl/curl/actions/runs/12611924141/job/35148104431?pr=15911#step:11:264
@vszakats vszakats changed the title autotools: try silencing bogus gcc warnings in libtool code autotools: try silencing gcc warnings in libtool code Jan 5, 2025
@vszakats vszakats changed the title autotools: try silencing gcc warnings in libtool code autotools: silence gcc warnings in libtool code Jan 5, 2025
@vszakats vszakats closed this in a3a131b Jan 5, 2025
@vszakats vszakats deleted the am-cygw-sugg-attr branch January 5, 2025 16:16
@vszakats
Copy link
Member Author

This issue seems to apply to any autotools mingw-gcc based build,
not just Cygwin.

./.libs/lt-sockfilt.c: In function 'lt_fatal':
./.libs/lt-sockfilt.c:615:1: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
  615 | lt_fatal (const char *file, int line, const char *message, ...)
      | ^~~~~~~~

https://github.com/curl/curl/actions/runs/12811344140/job/35720497994#step:12:173

Just guessing but it may happen always when libtool decides to
create a runner stub, e.g. to fixup loading DLLs.

Leaving this as-is for now, because the new job where it appeared
is just a temporary one (for testing mingw UWP builds with autotools.)
It would be somewhat harsh to disable this warning for all mingw-gcc.

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

Successfully merging this pull request may close these issues.

1 participant