-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fix Warnings #170
Fix Warnings #170
Conversation
3777949
to
39b6ae6
Compare
e89ac9d
to
a9d1dc0
Compare
Okay, this one's ready to go. It resolves all warnings enabled in the "picky" build except for those involved in #173. Once that's resolved too we can enable -Werror to avoid regressions here. I haven't looked at anything from |
Worth noting: this doesn't fix all the warnings in the config scripts since a lot of those warnings are inherited from stuff happening upstream with autotools. I just fixed the warnings internal to the configure scripts that have obvious fixes and come from files in qthreads that aren't vendored in from somewhere else. |
a9d1dc0
to
69a51f4
Compare
Some of the warnings are either inherited from autotoools, inherited from files vendored from upstream, or unavoidable given the nature of the test. This takes care of warnings that don't fall into those categories though.
… versions of gcc.
…stead of pointer arithmetic.
c2db460
to
8b9d3e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding replacing the INTERNAL
macro - is the function attribute not valid for all compilers? If we would like to restrict the visibility to hidden for dynamic linkage via static
, we might consider changing the macro implementation instead.
|
||
snprintf(dflt_str, 10, "%lu", dflt); | ||
snprintf(dflt_str, 21, "%lu", dflt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 21?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The max length of an unsigned long is 20 digits. snprintf
needs one more character than the max size, so 21.
@@ -71,7 +65,7 @@ void INTERNAL qt_makectxt(uctxt_t *ucp, | |||
/* HOWEVER, the function may not be expecting to pull from the stack, | |||
* several 64-bit architectures expect that args will be in the correct | |||
* registers! */ | |||
ucp->mc.mc_edi = va_arg(argp, uintptr_t); | |||
ucp->mc.mc_edi = *(uintptr_t*)sp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes more sense to me. Thanks for cleaning it up!
I'm not actually changing the |
To clarify a bit more: there are a few places the |
Ok, thanks, in that case, would it make sense to add a new macro, maybe |
I think |
Agreed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you! |
d6ce514
into
sandialabs:main
No description provided.