[quake3-commits] [ioquake/ioq3] 2ab109: Avoid 'register' declarations

Zachary J. Slater zjs at zacharyjackslater.com
Wed Jan 25 00:17:42 EST 2017


  Branch: refs/heads/master
  Home:   https://github.com/ioquake/ioq3
  Commit: 2ab109b7729774cdfb791c80e855dea61c7b4d2f
      https://github.com/ioquake/ioq3/commit/2ab109b7729774cdfb791c80e855dea61c7b4d2f
  Author: Simon McVittie <smcv at debian.org>
  Date:   2016-11-01 (Tue, 01 Nov 2016)

  Changed paths:
    M code/botlib/l_precomp.c
    M code/game/bg_lib.c
    M code/qcommon/md5.c
    M code/qcommon/vm_interpreted.c
    M code/renderergl1/tr_surface.c
    M code/ui/ui_shared.c

  Log Message:
  -----------
  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).


  Commit: bf3c88dcc1894578590d9ee31ee1241f719e6463
      https://github.com/ioquake/ioq3/commit/bf3c88dcc1894578590d9ee31ee1241f719e6463
  Author: Zachary J. Slater <zjs at zacharyjackslater.com>
  Date:   2017-01-24 (Tue, 24 Jan 2017)

  Changed paths:
    M code/botlib/l_precomp.c
    M code/game/bg_lib.c
    M code/qcommon/md5.c
    M code/qcommon/vm_interpreted.c
    M code/renderergl1/tr_surface.c
    M code/ui/ui_shared.c

  Log Message:
  -----------
  Merge pull request #227 from smcv/old-style-declaration

Don't use mostly obsolete 'register' keyword (Merge or get off the pot.)


Compare: https://github.com/ioquake/ioq3/compare/0238810f34ec...bf3c88dcc189


More information about the quake3-commits mailing list