irtimmer / tpm2-pk11

[DEPRECATED] PKCS#11 Module for TPM 2.0
BSD 2-Clause "Simplified" License
68 stars 24 forks source link

Prevent gcc warnings on memset() #72

Closed liuqun closed 6 years ago

liuqun commented 6 years ago

Adding #include <string.h> would prevent the following gcc warning:

[ 78%] Building C object CMakeFiles/tpm2-pk11.dir/src/sessions.c.o
/home/travis/build/liuqun/tpm2-pk11/src/sessions.c: In function ‘session_init’:
/home/travis/build/liuqun/tpm2-pk11/src/sessions.c:40:3: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration]
   memset(session, 0, sizeof(struct session));
   ^
/home/travis/build/liuqun/tpm2-pk11/src/sessions.c:40:3: warning: incompatible implicit declaration of built-in function ‘memset’ [enabled by default]