Readability: change some pointer parameter to be pointer to const
authorSylvain Becker <sylvain.becker@gmail.com>
Wed, 30 Oct 2019 16:06:51 +0100
changeset 13203fac2d8c66fa6
parent 13202 1254722e1722
child 13204 15c666c579f1
Readability: change some pointer parameter to be pointer to const
src/libm/k_rem_pio2.c
src/libm/math_private.h
src/test/SDL_test_md5.c
src/video/SDL_RLEaccel.c
src/video/x11/SDL_x11messagebox.c
src/video/x11/SDL_x11xinput2.c
     1.1 --- a/src/libm/k_rem_pio2.c	Wed Oct 30 15:43:49 2019 +0100
     1.2 +++ b/src/libm/k_rem_pio2.c	Wed Oct 30 16:06:51 2019 +0100
     1.3 @@ -149,7 +149,7 @@
     1.4  two24   =  1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
     1.5  twon24  =  5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
     1.6  
     1.7 -int32_t attribute_hidden __kernel_rem_pio2(double *x, double *y, int e0, int nx, const unsigned int prec, const int32_t *ipio2)
     1.8 +int32_t attribute_hidden __kernel_rem_pio2(const double *x, double *y, int e0, int nx, const unsigned int prec, const int32_t *ipio2)
     1.9  {
    1.10  	int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
    1.11  	double z,fw,f[20],fq[20],q[20];
     2.1 --- a/src/libm/math_private.h	Wed Oct 30 15:43:49 2019 +0100
     2.2 +++ b/src/libm/math_private.h	Wed Oct 30 16:06:51 2019 +0100
     2.3 @@ -221,7 +221,7 @@
     2.4       extern double __kernel_sin(double, double, int) attribute_hidden;
     2.5       extern double __kernel_cos(double, double) attribute_hidden;
     2.6       extern double __kernel_tan(double, double, int) attribute_hidden;
     2.7 -     extern int32_t __kernel_rem_pio2(double *, double *, int, int, const unsigned int,
     2.8 +     extern int32_t __kernel_rem_pio2(const double *, double *, int, int, const unsigned int,
     2.9                                    const int32_t *) attribute_hidden;
    2.10  
    2.11  #endif /* _MATH_PRIVATE_H_ */
     3.1 --- a/src/test/SDL_test_md5.c	Wed Oct 30 15:43:49 2019 +0100
     3.2 +++ b/src/test/SDL_test_md5.c	Wed Oct 30 16:06:51 2019 +0100
     3.3 @@ -56,7 +56,7 @@
     3.4  #include "SDL_test.h"
     3.5  
     3.6  /* Forward declaration of static helper function */
     3.7 -static void SDLTest_Md5Transform(MD5UINT4 * buf, MD5UINT4 * in);
     3.8 +static void SDLTest_Md5Transform(MD5UINT4 * buf, const MD5UINT4 * in);
     3.9  
    3.10  static unsigned char MD5PADDING[64] = {
    3.11    0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    3.12 @@ -229,7 +229,7 @@
    3.13  
    3.14  /* Basic MD5 step. Transforms buf based on in.
    3.15   */
    3.16 -static void SDLTest_Md5Transform(MD5UINT4 * buf, MD5UINT4 * in)
    3.17 +static void SDLTest_Md5Transform(MD5UINT4 * buf, const MD5UINT4 * in)
    3.18  {
    3.19    MD5UINT4  a = buf[0], b = buf[1], c = buf[2], d = buf[3];
    3.20  
     4.1 --- a/src/video/SDL_RLEaccel.c	Wed Oct 30 15:43:49 2019 +0100
     4.2 +++ b/src/video/SDL_RLEaccel.c	Wed Oct 30 16:06:51 2019 +0100
     4.3 @@ -1237,19 +1237,19 @@
     4.4  }
     4.5  
     4.6  static Uint32
     4.7 -getpix_8(Uint8 * srcbuf)
     4.8 +getpix_8(const Uint8 * srcbuf)
     4.9  {
    4.10      return *srcbuf;
    4.11  }
    4.12  
    4.13  static Uint32
    4.14 -getpix_16(Uint8 * srcbuf)
    4.15 +getpix_16(const Uint8 * srcbuf)
    4.16  {
    4.17      return *(Uint16 *) srcbuf;
    4.18  }
    4.19  
    4.20  static Uint32
    4.21 -getpix_24(Uint8 * srcbuf)
    4.22 +getpix_24(const Uint8 * srcbuf)
    4.23  {
    4.24  #if SDL_BYTEORDER == SDL_LIL_ENDIAN
    4.25      return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16);
     5.1 --- a/src/video/x11/SDL_x11messagebox.c	Wed Oct 30 15:43:49 2019 +0100
     5.2 +++ b/src/video/x11/SDL_x11messagebox.c	Wed Oct 30 16:06:51 2019 +0100
     5.3 @@ -625,7 +625,7 @@
     5.4  }
     5.5  
     5.6  static Bool
     5.7 -X11_MessageBoxEventTest(Display *display, XEvent *event, XPointer arg)
     5.8 +X11_MessageBoxEventTest(Display *display, XEvent *event, const XPointer arg)
     5.9  {
    5.10      const SDL_MessageBoxDataX11 *data = (const SDL_MessageBoxDataX11 *) arg;
    5.11      return ((event->xany.display == data->display) && (event->xany.window == data->window)) ? True : False;
     6.1 --- a/src/video/x11/SDL_x11xinput2.c	Wed Oct 30 15:43:49 2019 +0100
     6.2 +++ b/src/video/x11/SDL_x11xinput2.c	Wed Oct 30 16:06:51 2019 +0100
     6.3 @@ -42,7 +42,7 @@
     6.4   * this extension */
     6.5  static int xinput2_opcode;
     6.6  
     6.7 -static void parse_valuators(const double *input_values,unsigned char *mask,int mask_len,
     6.8 +static void parse_valuators(const double *input_values, const unsigned char *mask,int mask_len,
     6.9                              double *output_values,int output_values_len) {
    6.10      int i = 0,z = 0;
    6.11      int top = mask_len * 8;