With default build options from install section, Ubuntu reports the following error:
CC examples/tests_unit_test-tpm_io.o
In file included from /usr/include/stdio.h:867,
from /usr/local/include/wolfssl/wolfcrypt/wc_port.h:572,
from /usr/local/include/wolfssl/wolfcrypt/types.h:35,
from ./wolftpm/tpm2_types.h:85,
from ./wolftpm/tpm2.h:25,
from ./wolftpm/tpm2_wrap.h:25,
from examples/keygen/create_primary.c:24:
In function ‘printf’,
inlined from ‘TPM2_CreatePrimaryKey_Example.part.0’ at examples/keygen/create_primary.c:137:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:107:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
107 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘printf’,
inlined from ‘TPM2_CreatePrimaryKey_Example.part.0’ at examples/keygen/create_primary.c:138:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:107:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
107 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With default build options from install section, Ubuntu reports the following error: