-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pimd: Fix modern compiler issues with long strings #10394
Conversation
Lot's of these errors: pimd/pim_cmd.c: In function ‘interface_no_ip_igmp’: pimd/pim_cmd.c:7865:7: error: ‘/frr-pim:pim/address-family[...’ directive output may be truncated writing 44 bytes into a region of size between 21 and 1044 [-Werror=format-truncation=] 7865 | "%s/frr-pim:pim/address-family[address-family='%s']", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pimd/pim_cmd.c:7864:2: note: ‘snprintf’ output between 63 and 1086 bytes into a destination of size 1044 7864 | snprintf(pim_if_xpath, sizeof(pim_if_xpath), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7865 | "%s/frr-pim:pim/address-family[address-family='%s']", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7866 | VTY_CURR_XPATH, "frr-routing:ipv4"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fix them Signed-off-by: Donald Sharp <sharpd@nvidia.com>
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.
I do not agree with this strategy. XPATH_MAXLEN
denotes the maximum length of an Xpath. Adding to this constant or doubling it makes no sense whatsoever.
I have opened an alternative solution here.
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 amd64 part 9: Failed (click for details)Topotests Ubuntu 18.04 amd64 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-2907/artifact/TOPO9U18AMD64/ErrorLog/ Topotests Ubuntu 18.04 amd64 part 9: No useful log foundSuccessful on other platforms/tests
|
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.
looking at @qlyoung 's option ...
Closing this in favor of mine |
Lot's of these errors:
pimd/pim_cmd.c: In function ‘interface_no_ip_igmp’:
pimd/pim_cmd.c:7865:7: error: ‘/frr-pim:pim/address-family[...’ directive output may be truncated writing 44 bytes into a region of size between 21 and 1044 [-Werror=format-truncation=]
7865 | "%s/frr-pim:pim/address-family[address-family='%s']",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pimd/pim_cmd.c:7864:2: note: ‘snprintf’ output between 63 and 1086 bytes into a destination of size 1044
7864 | snprintf(pim_if_xpath, sizeof(pim_if_xpath),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7865 | "%s/frr-pim:pim/address-family[address-family='%s']",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7866 | VTY_CURR_XPATH, "frr-routing:ipv4");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fix them
Signed-off-by: Donald Sharp sharpd@nvidia.com