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

Fix unit tests in CI; fix GCC warning #96

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

bgilbert
Copy link
Collaborator

@bgilbert bgilbert commented Jan 11, 2025

GitHub was not running tests:

Invalid workflow file: .github/workflows/run_unit_tests.yml#L82
You have an error in your yaml syntax on line 82

GCC warning:

../tests/check_dicom.c: In function ‘test_element_CS_multivalue_empty_fn’:
../tests/check_dicom.c:306:21: warning: allocation of insufficient size ‘1’ for type ‘char *’ with size ‘8’ [-Walloc-size]

GitHub was not running them:

    Invalid workflow file: .github/workflows/run_unit_tests.yml#L82
    You have an error in your yaml syntax on line 82
@bgilbert bgilbert changed the title Fix GCC warning Fix unit tests in CI; fix GCC warning Jan 11, 2025
    ../tests/check_dicom.c: In function ‘test_element_CS_multivalue_empty_fn’:
    ../tests/check_dicom.c:306:21: warning: allocation of insufficient size ‘1’ for type ‘char *’ with size ‘8’ [-Walloc-size]
@@ -303,7 +303,7 @@ START_TEST(test_element_CS_multivalue_empty)
uint32_t vm = 0;

// since malloc(0) can be NULL on some platforms
char **values = malloc(1);
char **values = malloc(sizeof(char *));
Copy link
Collaborator

Choose a reason for hiding this comment

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

ooops!

@jcupitt jcupitt merged commit ee3e401 into ImagingDataCommons:main Jan 12, 2025
5 checks passed
@jcupitt
Copy link
Collaborator

jcupitt commented Jan 12, 2025

👍!

@bgilbert bgilbert deleted the warning branch January 12, 2025 16:06
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