Skip to content

Commit a5e9868

Browse files
committed
changed warnings in device_uid_api.h to be thrown also when size or str_size_max are zero
1 parent 741d229 commit a5e9868

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hal/device_uid_api.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323

2424
#if DEVICE_DEVICEUID
2525

26-
#ifndef MBED_DEVICEUID_SIZE
27-
#error "DEVICE UID Vendor implementation must define macro MBED_DEVICEUID_SIZE with the uid size in bytes!"
26+
#if !defined(MBED_DEVICEUID_SIZE) || (MBED_DEVICEUID_SIZE == 0)
27+
#error "DEVICE UID Vendor implementation must define macro MBED_DEVICEUID_SIZE with the non-zero uid size in bytes!"
2828
#endif
2929

30-
#ifndef MBED_DEVICEUID_STR_SIZE_MAX
31-
#warning "DEVICE UID max vendor string length not defined! device_uid_get_str() HAL interface is disabled!"
30+
#if !defined(MBED_DEVICEUID_STR_SIZE_MAX) || (MBED_DEVICEUID_STR_SIZE_MAX == 0)
31+
#warning "DEVICE UID max vendor string length not defined or zero! device_uid_get_str() HAL interface is disabled!"
3232
#endif
3333

3434
#ifdef __cplusplus

0 commit comments

Comments
 (0)