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

Gen2024 address compiler warnings #17

Open
wants to merge 6 commits into
base: gen2024
Choose a base branch
from

Conversation

mabruzzo
Copy link

This needs to be reviewed after #13 (which had resolved the flaking tests in the test-suite)


This PR consists of 2 commits and addresses some compiler warnings:

  1. First, it includes a commit from @ChristopherBignamini that resolved a long-standing compiler error within cool1D_cloudy_old_tables_g
  2. Second it includes a commit that fixes a few things within C files:
    • A handful of c functions had a [-Wreturn-type] compiler warning where a function was supposed to return a value but had at least 1 control flow branch where we didn't return anything.
    • Also fixed a spot in c_local_example where we were passing a chemistry_data** ptr to local_free_chemistry_data rather than a chemistry_data* ptr.

I have manually confirmed that all tests pass when we include these changes

mabruzzo and others added 6 commits December 18, 2024 15:16
We needed to pass `iH2shieldcustom` and `f_shield_custom` as arguments
to `lookup_cool_rates1d_g`. These variables already had type
declarations within `lookup_cool_rates1d_g`, but they because they were
passed as part of the argument list, they were previously locally
allocated within the function and used without initialization. This is
all fixed now
Cells at low temperatures previously exceeded the iteration limit. This
change should ensure that the tests produce consistent results.
Add logic to initialize itmask_tmp when primordial_chemistry==0. The
need for doing this was identified from running cooling_cell.py
A handful of c functions had a `[-Wreturn-type]` compiler warning where
a function was supposed to return a value but had at least 1 control
flow branch where we didn't return anything.

Also fixed a spot in `c_local_example` where we were passing a
`chemistry_data**` ptr to `local_free_chemistry_data` rather than a
`chemistry_data*` ptr.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants