Commit d4a67e2541cdbffca3c5f73e288d62e259672392

Sylvain Becker 2019-10-30T16:06:51

Readability: change some pointer parameter to be pointer to const

diff --git a/src/libm/k_rem_pio2.c b/src/libm/k_rem_pio2.c
index 393db54..3a4a588 100644
--- a/src/libm/k_rem_pio2.c
+++ b/src/libm/k_rem_pio2.c
@@ -149,7 +149,7 @@ one    = 1.0,
 two24   =  1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
 twon24  =  5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
 
-int32_t attribute_hidden __kernel_rem_pio2(double *x, double *y, int e0, int nx, const unsigned int prec, const int32_t *ipio2)
+int32_t attribute_hidden __kernel_rem_pio2(const double *x, double *y, int e0, int nx, const unsigned int prec, const int32_t *ipio2)
 {
 	int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
 	double z,fw,f[20],fq[20],q[20];
diff --git a/src/libm/math_private.h b/src/libm/math_private.h
index d0ef66a..0253555 100644
--- a/src/libm/math_private.h
+++ b/src/libm/math_private.h
@@ -221,7 +221,7 @@ __ieee754_sqrt(double)
      extern double __kernel_sin(double, double, int) attribute_hidden;
      extern double __kernel_cos(double, double) attribute_hidden;
      extern double __kernel_tan(double, double, int) attribute_hidden;
-     extern int32_t __kernel_rem_pio2(double *, double *, int, int, const unsigned int,
+     extern int32_t __kernel_rem_pio2(const double *, double *, int, int, const unsigned int,
                                   const int32_t *) attribute_hidden;
 
 #endif /* _MATH_PRIVATE_H_ */
diff --git a/src/test/SDL_test_md5.c b/src/test/SDL_test_md5.c
index 3e65ce9..f59cc02 100644
--- a/src/test/SDL_test_md5.c
+++ b/src/test/SDL_test_md5.c
@@ -56,7 +56,7 @@
 #include "SDL_test.h"
 
 /* Forward declaration of static helper function */
-static void SDLTest_Md5Transform(MD5UINT4 * buf, MD5UINT4 * in);
+static void SDLTest_Md5Transform(MD5UINT4 * buf, const MD5UINT4 * in);
 
 static unsigned char MD5PADDING[64] = {
   0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -229,7 +229,7 @@ void SDLTest_Md5Final(SDLTest_Md5Context * mdContext)
 
 /* Basic MD5 step. Transforms buf based on in.
  */
-static void SDLTest_Md5Transform(MD5UINT4 * buf, MD5UINT4 * in)
+static void SDLTest_Md5Transform(MD5UINT4 * buf, const MD5UINT4 * in)
 {
   MD5UINT4  a = buf[0], b = buf[1], c = buf[2], d = buf[3];
 
diff --git a/src/video/SDL_RLEaccel.c b/src/video/SDL_RLEaccel.c
index bcb33f4..ce694bc 100644
--- a/src/video/SDL_RLEaccel.c
+++ b/src/video/SDL_RLEaccel.c
@@ -1237,19 +1237,19 @@ RLEAlphaSurface(SDL_Surface * surface)
 }
 
 static Uint32
-getpix_8(Uint8 * srcbuf)
+getpix_8(const Uint8 * srcbuf)
 {
     return *srcbuf;
 }
 
 static Uint32
-getpix_16(Uint8 * srcbuf)
+getpix_16(const Uint8 * srcbuf)
 {
     return *(Uint16 *) srcbuf;
 }
 
 static Uint32
-getpix_24(Uint8 * srcbuf)
+getpix_24(const Uint8 * srcbuf)
 {
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
     return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16);
diff --git a/src/video/x11/SDL_x11messagebox.c b/src/video/x11/SDL_x11messagebox.c
index dd234e6..fb66eb2 100644
--- a/src/video/x11/SDL_x11messagebox.c
+++ b/src/video/x11/SDL_x11messagebox.c
@@ -625,7 +625,7 @@ X11_MessageBoxDraw( SDL_MessageBoxDataX11 *data, GC ctx )
 }
 
 static Bool
-X11_MessageBoxEventTest(Display *display, XEvent *event, XPointer arg)
+X11_MessageBoxEventTest(Display *display, XEvent *event, const XPointer arg)
 {
     const SDL_MessageBoxDataX11 *data = (const SDL_MessageBoxDataX11 *) arg;
     return ((event->xany.display == data->display) && (event->xany.window == data->window)) ? True : False;
diff --git a/src/video/x11/SDL_x11xinput2.c b/src/video/x11/SDL_x11xinput2.c
index 1bd5b18..94da667 100644
--- a/src/video/x11/SDL_x11xinput2.c
+++ b/src/video/x11/SDL_x11xinput2.c
@@ -42,7 +42,7 @@ static int xinput2_multitouch_supported = 0;
  * this extension */
 static int xinput2_opcode;
 
-static void parse_valuators(const double *input_values,unsigned char *mask,int mask_len,
+static void parse_valuators(const double *input_values, const unsigned char *mask,int mask_len,
                             double *output_values,int output_values_len) {
     int i = 0,z = 0;
     int top = mask_len * 8;