Skip to content

Update function prototypes to avoid compiler warnings with GCC 13#103

Merged
yantosca merged 1 commit intodevfrom
bugfix/gcc-13
Jun 14, 2024
Merged

Update function prototypes to avoid compiler warnings with GCC 13#103
yantosca merged 1 commit intodevfrom
bugfix/gcc-13

Conversation

@yantosca
Copy link
Copy Markdown
Contributor

This is the companion PR to #102. We have updated the function prototypes for the following functions to avoid compiler warnings:

  • Use_C
  • Use_F
  • Use_F90
  • Use_MATLAB
  • Generate

src/code.h
- Add "char* rootFileName" as the argument to Use_C, Use_F, Use_F90,
  and Use_MATLAB function prototypes

src/code_c.c
- Add "char* rootFileName" as the argument to Use_C

src/code_f77.c
- Add "char* rootFileName" as the argument to Use_F

src/code_f90.c
- Add "char *rootFileName" as the argument to Use_F90

src/code_matlab.c
- Add "char *rootFileName" as the argument to Use_MATLAB

src/gdata.h
- Add "char* rootFileName" as the argument to Generate function prototype

src/gen.c
- Add "char* rootFileName" as the argument to Generate

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca added build Related to makefiles and/or compilation bugfix Fixes a bug or a technical issue labels Jun 13, 2024
@yantosca yantosca added this to the 3.2.0 milestone Jun 13, 2024
@yantosca yantosca requested review from RolfSander and jimmielin June 13, 2024 19:47
@yantosca yantosca self-assigned this Jun 13, 2024
@yantosca yantosca changed the base branch from main to dev June 13, 2024 19:47
Copy link
Copy Markdown
Member

@jimmielin jimmielin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. These updates the function prototypes to match the actual arguments called in src/gen.c.

@yantosca yantosca merged commit 8639a99 into dev Jun 14, 2024
@yantosca yantosca deleted the bugfix/gcc-13 branch June 14, 2024 01:26
@RolfSander
Copy link
Copy Markdown
Contributor

Thanks for the fix, @yantosca! To be honest, I don't really understand why this has worked so far. In kpp.c we call Generate(rootFileName) with one argument but the function in gen.c was defined without any dummy arguments. Strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a bug or a technical issue build Related to makefiles and/or compilation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants