Skip to content

Commit

Permalink
Fix GCC warning
Browse files Browse the repository at this point in the history
    ../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]
  • Loading branch information
bgilbert committed Jan 11, 2025
1 parent fee7247 commit 30f99c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* much faster read of files with an EOT but no FGS [pcram-techcyte]
* add `dcm_filehandle_get_frame_number()` [jcupitt]
* add DICOM catenation support [jcupitt]
* fix GCC compiler warning [bgilbert]

## 1.1.0, 28/3/24

Expand Down
2 changes: 1 addition & 1 deletion tests/check_dicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *));

DcmElement *element = dcm_element_create(NULL, tag, DCM_VR_CS);
(void) dcm_element_set_value_string_multi(NULL, element, values, vm, true);
Expand Down

0 comments on commit 30f99c5

Please sign in to comment.