[FRR]: Fix compiler warnings#22909
Merged
yejianquan merged 2 commits intosonic-net:masterfrom Jul 1, 2025
Merged
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.
Signed-off-by: Carmine Scarpitta <[email protected]>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ahsalam
approved these changes
Jun 10, 2025
Contributor
Author
|
/azpw run Azure.sonic-buildimage |
Collaborator
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run Azure.sonic-buildimage |
Collaborator
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run Azure.sonic-buildimage |
Collaborator
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run Azure.sonic-buildimage |
Collaborator
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/AzurePipelines run Azure.sonic-buildimage |
|
Commenter does not have sufficient privileges for PR 22909 in repo sonic-net/sonic-buildimage |
Contributor
Author
|
/AzurePipelines run Azure.sonic-buildimage |
|
Commenter does not have sufficient privileges for PR 22909 in repo sonic-net/sonic-buildimage |
Contributor
Author
|
/azpw run Azure.sonic-buildimage |
Collaborator
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
Cherry-pick PR to 202505: #23181 |
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.