Skip to content

Commit 42ac72a

Browse files
committed
Fix 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]
1 parent 4e97644 commit 42ac72a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/check_dicom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ START_TEST(test_element_CS_multivalue_empty)
303303
uint32_t vm = 0;
304304

305305
// since malloc(0) can be NULL on some platforms
306-
char **values = malloc(1);
306+
char **values = malloc(sizeof(char *));
307307

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

0 commit comments

Comments
 (0)