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
Warnings when building with "enable remote packet capture" (gcc) #1029
Comments
The current API limits what can be done here - some calls take, as an argument, a pointer to a buffer into which an error message is placed, and that buffer is limited to The routines that don't take such a buffer, because We could:
and then, if we come up with replacements for the routines that explicitly take an error buffer pointer, have the replacements take a |
For some unknown reason, gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 only complains about the |
The reported warnings were given by: gcc (Debian 10.2.1-6), on Testing/Bullseye. |
I don't know enough the code affected by these changes. So I can't give a relevant opinion. I let you choose the best solution. |
For testing build with -Werror and see the remaining warnings, I have committed in my WIP PR #1028 a workaround with fxlb@a2776c5. Should I commit this while waiting for a solution? |
Yes. |
These were format-truncation warnings (See issue the-tcpdump-group#1029). This is a workaround while waiting for a fix.
These were format-truncation warnings (See issue the-tcpdump-group#1029). This is a workaround while waiting for a fix. (cherry picked from commit 8e0543e)
Commit 05068a7 implements a different solution to the same problem. |
So does the trim buffer seem a better long-term workaround than disabling the warning? |
I don't know. I don't get the warnings when reverting your commit on Debian Bullseye with gcc 10.2.1-6 nor clang version 11.0.1-2. |
I could not find any Linux-specific examples, but on OpenBSD it manifested as follows: https://ci.tcpdump.org/#/builders/31/builds/147 |
This looks resolved, any objections to closing? |
Closing then. |
These were format-truncation warnings (See issue the-tcpdump-group#1029). This is a workaround while waiting for a fix.
The text was updated successfully, but these errors were encountered: