[action] [PR:22909] [FRR]: Fix compiler warnings#23181
Merged
mssonicbld merged 1 commit intosonic-net:202505from Jul 2, 2025
Merged
[action] [PR:22909] [FRR]: Fix compiler warnings#23181mssonicbld merged 1 commit intosonic-net:202505from
mssonicbld merged 1 commit intosonic-net:202505from
Conversation
When compiling FRR, the compiler raises the following warnings:
```
../zebra/dplane_fpm_sonic.c:73:1: warning: data definition has no type or storage class
73 | DEFAULT_SRV6_LOCALSID_FORMAT_BLOCK_LEN = 32;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../zebra/dplane_fpm_sonic.c:73:1: warning: type defaults to 'int' in declaration of 'DEFAULT_SRV6_LOCALSID_FORMAT_BLOCK_LEN' [-Wimplicit-int] ../zebra/dplane_fpm_sonic.c:74:1: warning: data definition has no type or storage class
74 | DEFAULT_SRV6_LOCALSID_FORMAT_NODE_LEN = 16;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../zebra/dplane_fpm_sonic.c:74:1: warning: type defaults to 'int' in declaration of 'DEFAULT_SRV6_LOCALSID_FORMAT_NODE_LEN' [-Wimplicit-int] ../zebra/dplane_fpm_sonic.c:75:1: warning: data definition has no type or storage class
75 | DEFAULT_SRV6_LOCALSID_FORMAT_FUNCTION_LEN = 16;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../zebra/dplane_fpm_sonic.c:75:1: warning: type defaults to 'int' in declaration of 'DEFAULT_SRV6_LOCALSID_FORMAT_FUNCTION_LEN' [-Wimplicit-int] ../zebra/dplane_fpm_sonic.c:76:1: warning: data definition has no type or storage class
76 | DEFAULT_SRV6_LOCALSID_FORMAT_ARGUMENT_LEN = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../zebra/dplane_fpm_sonic.c:76:1: warning: type defaults to 'int' in declaration of 'DEFAULT_SRV6_LOCALSID_FORMAT_ARGUMENT_LEN' [-Wimplicit-int]
```
The problem is that some variables have been defined without specifying their type.
This commit fixes the warnings by defining those variables as macros.
Collaborator
Author
|
Original PR: #22909 |
Collaborator
Author
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When compiling FRR, the compiler raises the following warnings:
The problem is that some variables have been defined without specifying their type.
This commit fixes the warnings by defining those variables as macros.