eduardsui / tlse

Single C file TLS 1.2/1.3 implementation, using tomcrypt as crypto library
Other
544 stars 90 forks source link

Compile warnings in amalgamated libtomcrypt.c #26

Closed pjotawake closed 6 years ago

pjotawake commented 6 years ago

This is a wonderful project and really useful! I got TLS working with HTTP but also SMTP and POP3. Thanks for sharing your code.

For your information, when compiling with GCC 4.4 or 4.8 in Centos or Ubuntu some compile warnings about struct initialization pop up:

programming/ooo/tlse-master/libtomcrypt.c:31995: warning: excess elements in struct initializer programming/ooo/tlse-master/libtomcrypt.c:31995: warning: (near initialization for 'rijndael_desc') programming/ooo/tlse-master/libtomcrypt.c:31996: warning: excess elements in struct initializer programming/ooo/tlse-master/libtomcrypt.c:31996: warning: (near initialization for 'rijndael_desc') programming/ooo/tlse-master/libtomcrypt.c:32004: warning: excess elements in struct initializer programming/ooo/tlse-master/libtomcrypt.c:32004: warning: (near initialization for 'aes_desc') programming/ooo/tlse-master/libtomcrypt.c:32005: warning: excess elements in struct initializer programming/ooo/tlse-master/libtomcrypt.c:32005: warning: (near initialization for 'aes_desc')

eduardsui commented 6 years ago

I get this warnings too, I just need to find the time to re-generate the amalgamated version of tomcrypt.

pjotawake commented 6 years ago

When I remove the last two NULLs from line 31995 and line 32004, then the warnings disappear.

eduardsui commented 6 years ago

Seems OK now, thanks for suggesting a fix. Can we close it?

pjotawake commented 6 years ago

Thanks for the fix, issue can be closed.