Commit d5f51b2
authored
[FRR]: Fix compiler warnings (#23181)
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.1 parent cf1c101 commit d5f51b2
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
0 commit comments