From: Jonathan L. <jon...@us...> - 2011-10-27 16:06:15
|
Update of /cvsroot/srtp/srtp/crypto/cipher In directory vz-cvs-3.sog:/tmp/cvs-serv17730/crypto/cipher Modified Files: aes_icm.c Log Message: Fix inline functions when compiling as C99. Make private inlines in C files 'static inline', not just 'inline', or the compiler can discard the definition if it chooses not to inline it. Make functions declared in header files not be declared inline (if they're defined in a .c file). It looks like no functions in this category are used in LibSRTP's critical path, only for unit tests or generating AES tables. To see the problem prior to this commit, compile with "gcc -O0 -std=gnu99". Index: aes_icm.c =================================================================== RCS file: /cvsroot/srtp/srtp/crypto/cipher/aes_icm.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** aes_icm.c 20 May 2010 22:09:11 -0000 1.19 --- aes_icm.c 27 Oct 2011 16:06:12 -0000 1.20 *************** *** 293,297 **** */ ! inline void aes_icm_advance_ismacryp(aes_icm_ctx_t *c, uint8_t forIsmacryp) { /* fill buffer with new keystream */ --- 293,297 ---- */ ! static inline void aes_icm_advance_ismacryp(aes_icm_ctx_t *c, uint8_t forIsmacryp) { /* fill buffer with new keystream */ *************** *** 318,322 **** } ! inline void aes_icm_advance(aes_icm_ctx_t *c) { aes_icm_advance_ismacryp(c, 0); } --- 318,322 ---- } ! static inline void aes_icm_advance(aes_icm_ctx_t *c) { aes_icm_advance_ismacryp(c, 0); } |