cisco / libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
Other
1.21k stars 474 forks source link

Invalid syntax in util.c #206

Closed Globik closed 7 years ago

Globik commented 8 years ago

VC++ 2015 claims on invalid syntax in util.c :+1:

Line 146

https://github.com/cisco/libsrtp/blob/master/test/util.c unsigned char sextets[4] = {}; Is empty block scope array c99 or c11 standart? This is in c++ valid, but on c invalid. What is a work around like this? I do so => unsigned char sextets[4] = {0,0,0,0}; Compiled good, but unsure am I, is it correct?

traud commented 7 years ago

Thank you for reporting! I am just a external contributor like you, but yes, your solution is correct…

I am going to submit a Pull Request shortly – in your name. Furthermore, I added a compiler flag to GCC so not just the Microsoft guys but the Linux guys see such pitfalls in future as well. Thanks again for reporting and avoiding a headache for your fellows.