When compiling libcoap with format truncation warnings enabled,
GCC warns about the potential issue with "%u.%02u" format string,
since the first argument may produce more than one byte of output:
error: '%02u' directive output may be truncated writing 2 bytes
into a region of size between 0 and 3 [-Werror=format-truncation=]
The first argument (class) is limited to 3 bits according to the
specification. Mask the higher bits to fix the warning.