1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 09:03:04 +02:00
Files
archived-php-src/ext
Niels Dossche b915a1d8d7 Fix uninitialised variable warning in mbfilter_sjis.c
Compiling in release mode with UBSAN gives me the following compiler warning:
```
In function ‘mb_wchar_to_sjismac’:
mbfilter_sjis.c:1419:89: warning: ‘i’ may be used uninitialized [-Wmaybe-uninitialized]
 1419 | buf->state = (i << 24) | (index << 16) | (w & 0xFFFF);
      |                 ^~
mbfilter_sjis.c:1398:42: note: ‘i’ was declared here
 1398 | for (int i = 0; i < code_tbl_m_len; i++) {
      |          ^
```

Since the if condition will always be taken after the goto, we can get
rid of the warning by moving the label inside the if.

Signed-off-by: Alex Dowad <alexinbeijing@gmail.com>
2023-04-30 13:51:52 +02:00
..
2023-04-19 16:24:23 +02:00
2023-04-21 11:30:03 +01:00
2023-04-08 17:03:28 +01:00
2023-04-03 21:32:23 +02:00
2023-04-03 08:02:19 +02:00
2023-04-05 21:41:41 +02:00
2023-04-03 08:02:19 +02:00
2023-03-20 23:31:04 +01:00
2023-04-03 08:02:19 +02:00
2023-02-17 16:40:14 +00:00
2023-04-20 08:46:01 +02:00
2023-04-20 18:04:46 +10:00
2023-04-24 23:25:27 +02:00
2023-04-03 12:55:26 +02:00
2023-03-31 14:42:44 +02:00
2023-03-28 00:12:28 +02:00
2023-03-25 17:41:56 +00:00
2023-04-03 08:02:19 +02:00
2023-03-15 21:47:34 +01:00
2023-01-16 12:27:33 +01:00
2023-04-26 15:12:01 +02:00
2023-04-03 08:02:19 +02:00
2023-04-03 08:02:19 +02:00
2023-04-04 22:48:26 +03:00
2023-04-16 22:20:26 +02:00
2023-01-16 12:27:33 +01:00
2023-04-01 20:23:57 +02:00
2023-04-20 13:43:29 +02:00
2023-04-30 13:37:14 +02:00
2023-03-01 23:05:24 +01:00
2023-03-27 16:34:11 +02:00
2023-02-26 14:34:39 +00:00
2023-02-12 21:34:14 -07:00