Skip to content

Commit a60c6ee

Browse files
authoredJan 15, 2023
Mark constant static arrays in function bodies actually as const (#10325)
1 parent e951202 commit a60c6ee

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎Zend/zend_strtod.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ pow5mult
959959
{
960960
Bigint *b1, *p5, *p51;
961961
int i;
962-
static int p05[3] = { 5, 25, 125 };
962+
static const int p05[3] = { 5, 25, 125 };
963963

964964
if ((i = k & 3))
965965
b = multadd(b, p05[i-1], 0);

‎ext/hash/hash_snefru.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void ph(uint32_t h[16])
3939

4040
static inline void Snefru(uint32_t input[16])
4141
{
42-
static int shifts[4] = {16, 8, 16, 24};
42+
static const int shifts[4] = {16, 8, 16, 24};
4343
int b, index, rshift, lshift;
4444
const uint32_t *t0,*t1;
4545
uint32_t SBE,B00,B01,B02,B03,B04,B05,B06,B07,B08,B09,B10,B11,B12,B13,B14,B15;

‎ext/iconv/iconv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
906906
char *out_p;
907907
size_t out_left;
908908
zend_string *encoded = NULL;
909-
static int qp_table[256] = {
909+
static const int qp_table[256] = {
910910
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x00 */
911911
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 */
912912
3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x20 */

0 commit comments

Comments
 (0)