mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
contrib/bc: fix build with GCC
Building with GCC failed with the following error message:
error: to be safe all intermediate pointers in cast from 'char **'
to 'const char **' must be 'const' qualified [-Werror=cast-qual]
This was caused by main() being declared with "char *argv[]" as the
3rd parameter, but argv later being passed cast to "const char**":
113 | if (BC_IS_BC) s = bc_main(argc, (const char**) argv);
| ^
This is fixed by declaring the 3rd parameter of main() as "const
char *argv[]".
Reported by: CI
MFC after: 3 days
This commit is contained in:
parent
871911a4ab
commit
ef5752762b
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@
|
|||
#include <dc.h>
|
||||
|
||||
int
|
||||
main(int argc, char* argv[])
|
||||
main(int argc, const char* argv[])
|
||||
{
|
||||
BcStatus s;
|
||||
char* name;
|
||||
|
|
|
|||
Loading…
Reference in a new issue