Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Drombeys committed Apr 10, 2024
1 parent 8c9ad5b commit a8e1bea
Show file tree
Hide file tree
Showing 27 changed files with 121 additions and 119 deletions.
2 changes: 1 addition & 1 deletion src/LWO/lwio.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ platforms.

void revbytes( void *bp, int elsize, int elcount )
{
register unsigned char *p, *q;
unsigned char *p, *q;

p = ( unsigned char * ) bp;

Expand Down
20 changes: 10 additions & 10 deletions src/xrCompress/lzo/lzo1a.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ lzo1a_decompress ( const lzo_byte *in , lzo_uint in_len,
lzo_voidp wrkmem )
{
#if defined(LZO_OPTIMIZE_GNUC_i386)
register lzo_byte *op __asm__("%edi");
register const lzo_byte *ip __asm__("%esi");
register lzo_uint t __asm__("%ecx");
register const lzo_byte *m_pos __asm__("%ebx");
lzo_byte *op __asm__("%edi");
const lzo_byte *ip __asm__("%esi");
lzo_uint t __asm__("%ecx");
const lzo_byte *m_pos __asm__("%ebx");
#else
register lzo_byte *op;
register const lzo_byte *ip;
register lzo_uint t;
register const lzo_byte *m_pos;
lzo_byte *op;
const lzo_byte *ip;
lzo_uint t;
const lzo_byte *m_pos;
#endif
const lzo_byte * const ip_end = in + in_len;

Expand Down Expand Up @@ -264,9 +264,9 @@ do_compress ( const lzo_byte *in , lzo_uint in_len,
lzo_voidp wrkmem )
{
#if defined(LZO_OPTIMIZE_GNUC_i386)
register const lzo_byte *ip __asm__("%esi");
const lzo_byte *ip __asm__("%esi");
#else
register const lzo_byte *ip;
const lzo_byte *ip;
#endif
#if defined(__LZO_HASH_INCREMENTAL)
lzo_uint32 dv;
Expand Down
12 changes: 6 additions & 6 deletions src/xrCompress/lzo/lzo1a_cr.ch
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ static lzo_byte *
store_run(lzo_byte * const oo, const lzo_byte * const ii, lzo_uint r_len)
{
#if defined(LZO_OPTIMIZE_GNUC_i386)
register lzo_byte *op __asm__("%edi");
register const lzo_byte *ip __asm__("%esi");
register lzo_uint t __asm__("%ecx");
lzo_byte *op __asm__("%edi");
const lzo_byte *ip __asm__("%esi");
lzo_uint t __asm__("%ecx");
#else
register lzo_byte *op;
register const lzo_byte *ip;
register lzo_uint t;
lzo_byte *op;
const lzo_byte *ip;
lzo_uint t;
#endif

op = oo;
Expand Down
4 changes: 2 additions & 2 deletions src/xrCompress/lzo/lzo1b_c.ch
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ do_compress ( const lzo_byte *in , lzo_uint in_len,
/* this seems to work with buggy gcc */
/* #if defined(LZO_OPTIMIZE_GNUC_i386) */
#if 0 && defined(__GNUC__) && defined(__i386__)
register const lzo_byte *ip __asm__("%esi");
const lzo_byte *ip __asm__("%esi");
#else
register const lzo_byte *ip;
const lzo_byte *ip;
#endif
#if (DD_BITS > 0)
#if defined(__LZO_HASH_INCREMENTAL)
Expand Down
16 changes: 8 additions & 8 deletions src/xrCompress/lzo/lzo1b_d.ch
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ DO_DECOMPRESS ( const lzo_byte *in , lzo_uint in_len,
lzo_voidp wrkmem )
{
#if defined(LZO_OPTIMIZE_GNUC_i386)
register lzo_byte *op __asm__("%edi");
register const lzo_byte *ip __asm__("%esi");
register lzo_uint t __asm__("%ecx");
register const lzo_byte *m_pos __asm__("%ebx");
lzo_byte *op __asm__("%edi");
const lzo_byte *ip __asm__("%esi");
lzo_uint t __asm__("%ecx");
const lzo_byte *m_pos __asm__("%ebx");
#else
register lzo_byte *op;
register const lzo_byte *ip;
register lzo_uint t;
register const lzo_byte *m_pos;
lzo_byte *op;
const lzo_byte *ip;
lzo_uint t;
const lzo_byte *m_pos;
#endif

const lzo_byte * const ip_end = in + in_len;
Expand Down
12 changes: 6 additions & 6 deletions src/xrCompress/lzo/lzo1b_r.ch
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ LZO_PUBLIC(lzo_byte *)
STORE_RUN ( lzo_byte * const oo, const lzo_byte * const ii, lzo_uint r_len)
{
#if defined(LZO_OPTIMIZE_GNUC_i386)
register lzo_byte *op __asm__("%edi");
register const lzo_byte *ip __asm__("%esi");
register lzo_uint t __asm__("%ecx");
lzo_byte *op __asm__("%edi");
const lzo_byte *ip __asm__("%esi");
lzo_uint t __asm__("%ecx");
#else
register lzo_byte *op;
register const lzo_byte *ip;
register lzo_uint t;
lzo_byte *op;
const lzo_byte *ip;
lzo_uint t;
#endif

LZO_STATS(lzo_stats->literals += r_len);
Expand Down
16 changes: 8 additions & 8 deletions src/xrCompress/lzo/lzo1f_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ int do_compress ( const lzo_byte *in , lzo_uint in_len,
lzo_voidp wrkmem )
{
#if 0 && defined(__GNUC__) && defined(__i386__)
register const lzo_byte *ip __asm__("%esi");
const lzo_byte *ip __asm__("%esi");
#else
register const lzo_byte *ip;
const lzo_byte *ip;
#endif
lzo_byte *op;
const lzo_byte * const in_end = in + in_len;
Expand All @@ -75,9 +75,9 @@ int do_compress ( const lzo_byte *in , lzo_uint in_len,
for (;;)
{
#if 0 && defined(__GNUC__) && defined(__i386__)
register const lzo_byte *m_pos __asm__("%edi");
const lzo_byte *m_pos __asm__("%edi");
#else
register const lzo_byte *m_pos;
const lzo_byte *m_pos;
#endif
lzo_moff_t m_off;
lzo_uint m_len;
Expand Down Expand Up @@ -147,15 +147,15 @@ int do_compress ( const lzo_byte *in , lzo_uint in_len,
lit = pd(ip,ii);
if (lit > 0)
{
register lzo_uint t = lit;
lzo_uint t = lit;

if (t < 4 && op > out)
op[-2] |= LZO_BYTE(t);
else if (t <= 31)
*op++ = LZO_BYTE(t);
else
{
register lzo_uint tt = t - 31;
lzo_uint tt = t - 31;

*op++ = 0;
while (tt > 255)
Expand Down Expand Up @@ -238,15 +238,15 @@ int do_compress ( const lzo_byte *in , lzo_uint in_len,
/* store final literal run */
if (pd(in_end,ii) > 0)
{
register lzo_uint t = pd(in_end,ii);
lzo_uint t = pd(in_end,ii);

if (t < 4 && op > out)
op[-2] |= LZO_BYTE(t);
else if (t <= 31)
*op++ = LZO_BYTE(t);
else
{
register lzo_uint tt = t - 31;
lzo_uint tt = t - 31;

*op++ = 0;
while (tt > 255)
Expand Down
8 changes: 4 additions & 4 deletions src/xrCompress/lzo/lzo1f_d.ch
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ DO_DECOMPRESS ( const lzo_byte *in , lzo_uint in_len,
lzo_byte *out, lzo_uintp out_len,
lzo_voidp wrkmem )
{
register lzo_byte *op;
register const lzo_byte *ip;
register lzo_uint t;
register const lzo_byte *m_pos;
lzo_byte *op;
const lzo_byte *ip;
lzo_uint t;
const lzo_byte *m_pos;

const lzo_byte * const ip_end = in + in_len;
#if defined(HAVE_ANY_OP)
Expand Down
14 changes: 7 additions & 7 deletions src/xrCompress/lzo/lzo1x_c.ch
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ lzo_uint do_compress ( const lzo_byte *in , lzo_uint in_len,
lzo_voidp wrkmem )
{
#if 0 && defined(__GNUC__) && defined(__i386__)
register const lzo_byte *ip __asm__("%esi");
const lzo_byte *ip __asm__("%esi");
#else
register const lzo_byte *ip;
const lzo_byte *ip;
#endif
lzo_byte *op;
const lzo_byte * const in_end = in + in_len;
Expand All @@ -54,9 +54,9 @@ lzo_uint do_compress ( const lzo_byte *in , lzo_uint in_len,
for (;;)
{
#if 0 && defined(__GNUC__) && defined(__i386__)
register const lzo_byte *m_pos __asm__("%edi");
const lzo_byte *m_pos __asm__("%edi");
#else
register const lzo_byte *m_pos;
const lzo_byte *m_pos;
#endif
lzo_moff_t m_off;
lzo_uint m_len;
Expand Down Expand Up @@ -117,7 +117,7 @@ try_match:
if (m_off <= M1_MAX_OFFSET && lit == 3)
#endif
{
register lzo_uint t;
lzo_uint t;

t = lit;
assert(op - 2 > out); op[-2] |= LZO_BYTE(t);
Expand Down Expand Up @@ -149,7 +149,7 @@ match:
/* store current literal run */
if (pd(ip,ii) > 0)
{
register lzo_uint t = pd(ip,ii);
lzo_uint t = pd(ip,ii);

if (t <= 3)
{
Expand All @@ -160,7 +160,7 @@ match:
*op++ = LZO_BYTE(t - 3);
else
{
register lzo_uint tt = t - 18;
lzo_uint tt = t - 18;

*op++ = 0;
while (tt > 255)
Expand Down
8 changes: 4 additions & 4 deletions src/xrCompress/lzo/lzo1x_d.ch
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ DO_DECOMPRESS ( const lzo_byte *in , lzo_uint in_len,
lzo_voidp wrkmem )
#endif
{
register lzo_byte *op;
register const lzo_byte *ip;
register lzo_uint t;
lzo_byte *op;
const lzo_byte *ip;
lzo_uint t;
#if defined(COPY_DICT)
lzo_uint m_off;
const lzo_byte *dict_end;
#else
register const lzo_byte *m_pos;
const lzo_byte *m_pos;
#endif

const lzo_byte * const ip_end = in + in_len;
Expand Down
4 changes: 2 additions & 2 deletions src/xrCompress/lzo/lzo1x_d3.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

#define COPY_DICT_DICT(m_len,m_off) \
{ \
register const lzo_byte *m_pos; \
const lzo_byte *m_pos; \
m_off -= (lzo_moff_t) (op - out); assert(m_off > 0); \
if (m_off > dict_len) goto lookbehind_overrun; \
m_pos = dict_end - m_off; \
Expand All @@ -83,7 +83,7 @@
assert(m_len >= 2); assert(m_off > 0); assert(op > out); \
if (m_off <= (lzo_moff_t) (op - out)) \
{ \
register const lzo_byte *m_pos = op - m_off; \
const lzo_byte *m_pos = op - m_off; \
DICT_MEMMOVE(op,m_pos,m_len,m_off) \
} \
else \
Expand Down
12 changes: 6 additions & 6 deletions src/xrCompress/lzo/lzo2a_d.ch
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ DO_DECOMPRESS ( const lzo_byte *in , lzo_uint in_len,
lzo_voidp wrkmem )
{
#if defined(LZO_OPTIMIZE_GNUC_i386)
register lzo_byte *op __asm__("%edi");
register const lzo_byte *ip __asm__("%esi");
register const lzo_byte *m_pos __asm__("%ebx");
lzo_byte *op __asm__("%edi");
const lzo_byte *ip __asm__("%esi");
const lzo_byte *m_pos __asm__("%ebx");
#else
register lzo_byte *op;
register const lzo_byte *ip;
register const lzo_byte *m_pos;
lzo_byte *op;
const lzo_byte *ip;
const lzo_byte *m_pos;
#endif

lzo_uint t;
Expand Down
2 changes: 1 addition & 1 deletion src/xrCompress/lzo/lzo_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ _lzo_config_check(void)
{
static int x[3];
static unsigned xn = 3;
register unsigned j;
unsigned j;

for (j = 0; j < xn; j++)
x[j] = (int)j - 3;
Expand Down
6 changes: 3 additions & 3 deletions src/xrCompress/lzo/lzo_swd.ch
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ static
void swd_search(lzo_swd_t *s, lzo_uint node, lzo_uint cnt)
{
#if 0 && defined(__GNUC__) && defined(__i386__)
register const unsigned char *p1 __asm__("%edi");
register const unsigned char *p2 __asm__("%esi");
register const unsigned char *px __asm__("%edx");
const unsigned char *p1 __asm__("%edi");
const unsigned char *p2 __asm__("%esi");
const unsigned char *px __asm__("%edx");
#else
const unsigned char *p1;
const unsigned char *p2;
Expand Down
2 changes: 1 addition & 1 deletion src/xrCompress/lzo/lzo_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ extern "C" {
#if !defined(MEMCPY8_DS)

#define MEMCPY8_DS(dest,src,len) \
{ register lzo_uint __l = (len) / 8; \
{ lzo_uint __l = (len) / 8; \
do { \
*dest++ = *src++; \
*dest++ = *src++; \
Expand Down
8 changes: 4 additions & 4 deletions src/xrCore/rt_lzo1x_c.ch
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ do_compress ( const lzo_bytep in , lzo_uint in_len,
lzo_bytep out, lzo_uintp out_len,
lzo_voidp wrkmem )
{
register const lzo_bytep ip;
const lzo_bytep ip;
lzo_bytep op;
const lzo_bytep const in_end = in + in_len;
const lzo_bytep const ip_end = in + in_len - M2_MAX_LEN - 5;
Expand All @@ -58,7 +58,7 @@ do_compress ( const lzo_bytep in , lzo_uint in_len,
ip += 4;
for (;;)
{
register const lzo_bytep m_pos;
const lzo_bytep m_pos;
lzo_uint m_off;
lzo_uint m_len;
lzo_uint dindex;
Expand Down Expand Up @@ -150,7 +150,7 @@ match:
/* store current literal run */
if (pd(ip,ii) > 0)
{
register lzo_uint t = pd(ip,ii);
lzo_uint t = pd(ip,ii);

if (t <= 3)
{
Expand All @@ -161,7 +161,7 @@ match:
*op++ = LZO_BYTE(t - 3);
else
{
register lzo_uint tt = t - 18;
lzo_uint tt = t - 18;

*op++ = 0;
while (tt > 255)
Expand Down
8 changes: 4 additions & 4 deletions src/xrCore/rt_lzo1x_d.ch
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
lzo_voidp wrkmem )
#endif
{
register lzo_bytep op;
register const lzo_bytep ip;
register lzo_uint t;
lzo_bytep op;
const lzo_bytep ip;
lzo_uint t;
#if defined(COPY_DICT)
lzo_uint m_off;
const lzo_bytep dict_end;
#else
register const lzo_bytep m_pos;
const lzo_bytep m_pos;
#endif

const lzo_bytep const ip_end = in + in_len;
Expand Down
Loading

0 comments on commit a8e1bea

Please sign in to comment.