Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building with -Werror for ngen #106

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/bmi_cfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ int read_init_config_cfe(const char* config_file, cfe_state_struct* model)

for (i = 0; i < config_line_count; i++) {
char *param_key, *param_value, *param_units;
fgets(config_line, max_config_line_length + 1, fp);
if (fgets(config_line, max_config_line_length + 1, fp) == NULL)
return BMI_FAILURE;
#if CFE_DEBUG >= 3
printf("Line value: ['%s']\n", config_line);
#endif
Expand Down Expand Up @@ -1252,12 +1253,14 @@ static int Initialize (Bmi *self, const char *file)
long year, month, day, hour, minute;
double dsec;
// First read the header line
fgets(line_str, max_forcing_line_length + 1, ffp);
if (fgets(line_str, max_forcing_line_length + 1, ffp) == NULL)
return BMI_FAILURE;

aorc_forcing_data_cfe forcings;

for (i = 0; i < cfe_bmi_data_ptr->num_timesteps; i++) {
fgets(line_str, max_forcing_line_length + 1, ffp); // read in a line of AORC data.
if (fgets(line_str, max_forcing_line_length + 1, ffp) == NULL) // read in a line of AORC data.
return BMI_FAILURE;
parse_aorc_line_cfe(line_str, &year, &month, &day, &hour, &minute, &dsec, &forcings);
#if CFE_DEBUG > 0
printf("Forcing data: [%s]\n", line_str);
Expand Down
Loading