Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
science
cdo
deregister.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File deregister.patch of Package cdo
Author: Alastair McKinstry <mckinstry@debian.org> Bugs-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790393 Description: Remove 'register' from C code. Especially never try to get the address of a register. Breaks HPPA code at least, and compilers do this better in the 21st century. diff -Nupr cdo-2.2.0.orig/libcdi/src/cdilib.c cdo-2.2.0/libcdi/src/cdilib.c --- cdo-2.2.0.orig/libcdi/src/cdilib.c 2023-04-18 21:43:48.000000000 +0200 +++ cdo-2.2.0/libcdi/src/cdilib.c 2023-05-05 17:17:17.653936550 +0200 @@ -20810,7 +20810,7 @@ memcrc(const unsigned char *b, size_t n) /* Extend with the length of the string. */ while (n != 0) { - register uint32_t c = n & 0377; + uint32_t c = n & 0377; n >>= 8; s = (s << 8) ^ crctab[(s >> 24) ^ c]; } @@ -20826,9 +20826,9 @@ memcrc_r(uint32_t *state, const unsigned * size_t n == length of sequence */ - register uint32_t c, s = *state; - register size_t n = block_len; - register const unsigned char *b = block; + uint32_t c, s = *state; + size_t n = block_len; + const unsigned char *b = block; for (; n > 0; --n) { @@ -20843,7 +20843,7 @@ memcrc_r(uint32_t *state, const unsigned #define SWAP_CSUM(BITWIDTH, BYTEWIDTH, NACC) \ do \ { \ - register const uint##BITWIDTH##_t *b = (uint##BITWIDTH##_t *) elems; \ + const uint##BITWIDTH##_t *b = (uint##BITWIDTH##_t *) elems; \ for (size_t i = 0; i < num_elems; ++i) \ { \ for (size_t aofs = NACC; aofs > 0; --aofs) \ @@ -20872,7 +20872,7 @@ void memcrc_r_eswap(uint32_t *state, const unsigned char *elems, size_t num_elems, size_t elem_size) { #ifdef WORDS_BIGENDIAN - register uint32_t s = *state; + uint32_t s = *state; switch (elem_size) { @@ -20891,8 +20891,8 @@ memcrc_r_eswap(uint32_t *state, const un uint32_t memcrc_finish(uint32_t *state, off_t total_size) { - register uint32_t c, s = *state; - register uint64_t n = (uint64_t) total_size; + uint32_t c, s = *state; + uint64_t n = (uint64_t) total_size; /* Extend with the length of the string. */ while (n != 0) diff -Nupr cdo-2.2.0.orig/libcdi/src/cksum.c cdo-2.2.0/libcdi/src/cksum.c --- cdo-2.2.0.orig/libcdi/src/cksum.c 2023-01-25 18:10:17.000000000 +0100 +++ cdo-2.2.0/libcdi/src/cksum.c 2023-05-05 17:16:15.277713525 +0200 @@ -54,7 +54,7 @@ memcrc(const unsigned char *b, size_t n) /* Extend with the length of the string. */ while (n != 0) { - register uint32_t c = n & 0377; + uint32_t c = n & 0377; n >>= 8; s = (s << 8) ^ crctab[(s >> 24) ^ c]; } @@ -70,9 +70,9 @@ memcrc_r(uint32_t *state, const unsigned * size_t n == length of sequence */ - register uint32_t c, s = *state; - register size_t n = block_len; - register const unsigned char *b = block; + uint32_t c, s = *state; + size_t n = block_len; + const unsigned char *b = block; for (; n > 0; --n) { @@ -87,7 +87,7 @@ memcrc_r(uint32_t *state, const unsigned #define SWAP_CSUM(BITWIDTH, BYTEWIDTH, NACC) \ do \ { \ - register const uint##BITWIDTH##_t *b = (uint##BITWIDTH##_t *) elems; \ + const uint##BITWIDTH##_t *b = (uint##BITWIDTH##_t *) elems; \ for (size_t i = 0; i < num_elems; ++i) \ { \ for (size_t aofs = NACC; aofs > 0; --aofs) \ @@ -116,7 +116,7 @@ void memcrc_r_eswap(uint32_t *state, const unsigned char *elems, size_t num_elems, size_t elem_size) { #ifdef WORDS_BIGENDIAN - register uint32_t s = *state; + uint32_t s = *state; switch (elem_size) { @@ -135,8 +135,8 @@ memcrc_r_eswap(uint32_t *state, const un uint32_t memcrc_finish(uint32_t *state, off_t total_size) { - register uint32_t c, s = *state; - register uint64_t n = (uint64_t) total_size; + uint32_t c, s = *state; + uint64_t n = (uint64_t) total_size; /* Extend with the length of the string. */ while (n != 0) diff -Nupr cdo-2.2.0.orig/src/lib/healpix/qsort_reentrant.c cdo-2.2.0/src/lib/healpix/qsort_reentrant.c --- cdo-2.2.0.orig/src/lib/healpix/qsort_reentrant.c 2022-10-14 08:27:42.000000000 +0200 +++ cdo-2.2.0/src/lib/healpix/qsort_reentrant.c 2023-05-05 17:18:20.334161050 +0200 @@ -63,10 +63,10 @@ static __inline void swapfunc(char * */ #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); \
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor