Skip to content

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]

// 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