Avoid 'register' declarations
gcc 6 with -Wall -Wextra warns: code/botlib/l_precomp.c: In function ‘PC_NameHash’: code/botlib/l_precomp.c:551:2: warning: ‘register’ is not at beginning of declaration [-Wold-style-declaration] int register hash, i; ^~~ Modern compilers either ignore the register storage class when generating code, or generate better code without it, so just remove most of them. The remaining uses are in third-party bundled libraries (libjpeg, zlib), and in a PowerPC-specific inline function consisting of inline assembler (because I'm not 100% confident that it doesn't have some practical use there).
This commit is contained in:
parent
863adfcfc2
commit
2ab109b772
6 changed files with 10 additions and 10 deletions
|
@ -53,10 +53,10 @@ static void swapfunc(char *, char *, int, int);
|
|||
*/
|
||||
#define swapcode(TYPE, parmi, parmj, n) { \
|
||||
long i = (n) / sizeof (TYPE); \
|
||||
register TYPE *pi = (TYPE *) (parmi); \
|
||||
register TYPE *pj = (TYPE *) (parmj); \
|
||||
TYPE *pi = (TYPE *) (parmi); \
|
||||
TYPE *pj = (TYPE *) (parmj); \
|
||||
do { \
|
||||
register TYPE t = *pi; \
|
||||
TYPE t = *pi; \
|
||||
*pi++ = *pj; \
|
||||
*pj++ = t; \
|
||||
} while (--i > 0); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue