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

Fix (and silence) a bunch of build-time diagnostics ("warnings") #1278

Merged
merged 20 commits into from
Aug 21, 2022

Conversation

jepler
Copy link
Contributor

@jepler jepler commented Sep 26, 2021

No description provided.

Copy link
Collaborator

@SebKuzminsky SebKuzminsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a couple of copy/paste errors.

src/emc/usr_intf/emcrsh.cc Outdated Show resolved Hide resolved
src/emc/usr_intf/schedrmt.cc Outdated Show resolved Hide resolved
src/hal/utils/halcmd_main.c Show resolved Hide resolved
@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Jul 15, 2022 via email

@petterreinholdtsen
Copy link
Collaborator

The *QUIETFLAGS Makefile variables seem scary, hiding coding errors that could cause security or stability issues. Perhaps we should make an effort to get completely rid of them?

@petterreinholdtsen
Copy link
Collaborator

Note, I tried addressing one of the warnings in #1922 by completely rewriting the print methods to avoid statically allocated buffers.

@jepler jepler force-pushed the jepler/warnings-fixes branch 2 times, most recently from 7b58951 to e53842d Compare August 20, 2022 02:13
@jepler
Copy link
Contributor Author

jepler commented Aug 20, 2022

I've heavily revised this PR and would appreciate re-review @SebKuzminsky @petterreinholdtsen

Copy link
Collaborator

@petterreinholdtsen petterreinholdtsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good, more unsure about the build option changes, as some of them only hide the warnings, but do not solve the issues.

src/emc/kinematics/Submakefile Outdated Show resolved Hide resolved
src/libnml/rcs/rcs_print.cc Outdated Show resolved Hide resolved
We deliberately use truncating formats and string operations, this
is not something the compiler should warn us about.
These occur internally to boost::python headers.
4/5 based on a review comment by seb, 1 more caught by grep
.. so rename it. I don't know if anyone is using the rule, but if so
they have to adjust their manual process

This also fixes the build-time diagnostic
```
Makefile:865: warning: overriding recipe for target 'install-menu'
Makefile:648: warning: ignoring old recipe for target 'install-menu'
```
.. it's ignored in the caller, but this should be the return value.
It quiets a diagnostic about res being assigned but not used.
.. the manpage is still generated.

This is done simply to get rid of the diagnostic message when it's built
in-tree.

I considered the alternative of providing a TOPDIR value during build,
but as I would only be able to test it during a uspace build I decided
not to do so. I'd be happy to see it done as a substitute, though, as
otherwise the component is likely to bitrot.
.. it quiets some stringop-truncation diagnostics
@jepler jepler merged commit d1c1042 into master Aug 21, 2022
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

Successfully merging this pull request may close these issues.

4 participants