Readability: change some pointer parameter to be pointer to const
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
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;