Zephyr UUID compiled warning

Hi  

I use different UUID setting , setting 2 on any compiled warning , but setting 1 has compiled warning .

below is UUID:

setting 1 :  

    #define BT_UUID_CUSTOM_SERVICE_VAL BT_UUID_128_ENCODE(0x00010000, 0x452d, 0x4269, 0x6b65, 0x000061636572)
    static struct bt_uuid_128 vnd_uuid = BT_UUID_INIT_128(BT_UUID_CUSTOM_SERVICE_VAL);
    static const struct bt_uuid_128 MEASUREMENT_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010001, 0x452d, 0x4269, 0x6b65, 0x000061636572));
    static const struct bt_uuid_128 INFORMATION_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010004, 0x452d, 0x4269, 0x6b65, 0x000061636572));
    static const struct bt_uuid_128 CTRLPT_CHAR_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010010, 0x452d, 0x4269, 0x6b65, 0x000061636572));
    static const struct bt_uuid_128 CTRLPT2_CHAR_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010011, 0x452d, 0x4269, 0x6b65, 0x000061636572));
setting 2:
     #define BT_UUID_CUSTOM_SERVICE_VAL BT_UUID_128_ENCODE(0x00010000, 0x452d, 0x4269, 0x6b65, 0x58706c6f7661)
     static struct bt_uuid_128 vnd_uuid = BT_UUID_INIT_128(BT_UUID_CUSTOM_SERVICE_VAL);
    static const struct bt_uuid_128 MEASUREMENT_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010001, 0x452d, 0x4269, 0x6b65, 0x58706c6f7661));
    static const struct bt_uuid_128 INFORMATION_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010004, 0x452d, 0x4269, 0x6b65, 0x58706c6f7661));
    static const struct bt_uuid_128 CTRLPT_CHAR_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010010, 0x452d, 0x4269, 0x6b65, 0x58706c6f7661));
    static const struct bt_uuid_128 CTRLPT2_CHAR_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010011, 0x452d, 0x4269, 0x6b65, 0x58706c6f7661));
The warning:
      In file included from C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/gatt.h:28,
from ../src/cus/ble_cus.c:10:
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:181:17: warning: right shift count >= width of type [-Wshift-count-overflow]
181 | (((w48) >> 32) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:114:40: note: in expansion of macro 'BT_UUID_128_ENCODE'
114 | #define BT_UUID_CUSTOM_SERVICE_VAL BT_UUID_128_ENCODE(0x00010000, 0x452d, 0x4269, 0x6b65, 0x000061636572)
| ^~~~~~~~~~~~~~~~~~
../src/cus/ble_cus.c:119:55: note: in expansion of macro 'BT_UUID_CUSTOM_SERVICE_VAL'
119 | static struct bt_uuid_128 vnd_uuid = BT_UUID_INIT_128(BT_UUID_CUSTOM_SERVICE_VAL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:182:17: warning: right shift count >= width of type [-Wshift-count-overflow]
182 | (((w48) >> 40) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:114:40: note: in expansion of macro 'BT_UUID_128_ENCODE'
114 | #define BT_UUID_CUSTOM_SERVICE_VAL BT_UUID_128_ENCODE(0x00010000, 0x452d, 0x4269, 0x6b65, 0x000061636572)
| ^~~~~~~~~~~~~~~~~~
../src/cus/ble_cus.c:119:55: note: in expansion of macro 'BT_UUID_CUSTOM_SERVICE_VAL'
119 | static struct bt_uuid_128 vnd_uuid = BT_UUID_INIT_128(BT_UUID_CUSTOM_SERVICE_VAL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:181:17: warning: right shift count >= width of type [-Wshift-count-overflow]
181 | (((w48) >> 32) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:124:73: note: in expansion of macro 'BT_UUID_128_ENCODE'
124 | static const struct bt_uuid_128 MEASUREMENT_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010001, 0x452d, 0x4269, 0x6b65, 0x000061636572));
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:182:17: warning: right shift count >= width of type [-Wshift-count-overflow]
182 | (((w48) >> 40) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:124:73: note: in expansion of macro 'BT_UUID_128_ENCODE'
124 | static const struct bt_uuid_128 MEASUREMENT_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010001, 0x452d, 0x4269, 0x6b65, 0x000061636572));
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:181:17: warning: right shift count >= width of type [-Wshift-count-overflow]
181 | (((w48) >> 32) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:125:73: note: in expansion of macro 'BT_UUID_128_ENCODE'
125 | static const struct bt_uuid_128 INFORMATION_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010004, 0x452d, 0x4269, 0x6b65, 0x000061636572));
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:182:17: warning: right shift count >= width of type [-Wshift-count-overflow]
182 | (((w48) >> 40) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:125:73: note: in expansion of macro 'BT_UUID_128_ENCODE'
125 | static const struct bt_uuid_128 INFORMATION_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010004, 0x452d, 0x4269, 0x6b65, 0x000061636572));
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:181:17: warning: right shift count >= width of type [-Wshift-count-overflow]
181 | (((w48) >> 32) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:126:73: note: in expansion of macro 'BT_UUID_128_ENCODE'
126 | static const struct bt_uuid_128 CTRLPT_CHAR_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010010, 0x452d, 0x4269, 0x6b65, 0x000061636572));
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:182:17: warning: right shift count >= width of type [-Wshift-count-overflow]
182 | (((w48) >> 40) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:126:73: note: in expansion of macro 'BT_UUID_128_ENCODE'
126 | static const struct bt_uuid_128 CTRLPT_CHAR_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010010, 0x452d, 0x4269, 0x6b65, 0x000061636572));
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:181:17: warning: right shift count >= width of type [-Wshift-count-overflow]
181 | (((w48) >> 32) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:127:74: note: in expansion of macro 'BT_UUID_128_ENCODE'
127 | static const struct bt_uuid_128 CTRLPT2_CHAR_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010011, 0x452d, 0x4269, 0x6b65, 0x000061636572));
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:182:17: warning: right shift count >= width of type [-Wshift-count-overflow]
182 | (((w48) >> 40) & 0xFF), \
| ^~
C:/ncs/v2.4.2/zephyr/include/zephyr/bluetooth/uuid.h:102:18: note: in definition of macro 'BT_UUID_INIT_128'
102 | .val = { value }, \
| ^~~~~
../src/cus/ble_cus.c:127:74: note: in expansion of macro 'BT_UUID_128_ENCODE'
127 | static const struct bt_uuid_128 CTRLPT2_CHAR_uuid = BT_UUID_INIT_128(BT_UUID_128_ENCODE(0x00010011, 0x452d, 0x4269, 0x6b65, 0x000061636572));
Related