Browse Source

silence some compiler warnings

Wei Mingzhi 6 years ago
parent
commit
40cbf83060
2 changed files with 6 additions and 6 deletions
  1. 4 4
      codepage.h
  2. 2 2
      palcfg.c

+ 4 - 4
codepage.h

@@ -29,7 +29,7 @@
 #error "This file should only be included inside text.c!"
 #endif
 
-static WCHAR cptbl_gbk[126][192] = {
+static const WCHAR cptbl_gbk[126][192] = {
   {
     0x4E02,0x4E04,0x4E05,0x4E06,0x4E0F,0x4E12,0x4E17,0x4E1F,0x4E20,0x4E21,0x4E23,0x4E26,0x4E29,0x4E2E,0x4E2F,0x4E31,
     0x4E33,0x4E35,0x4E37,0x4E3C,0x4E40,0x4E41,0x4E42,0x4E44,0x4E46,0x4E4A,0x4E51,0x4E55,0x4E57,0x4E5A,0x4E5B,0x4E62,
@@ -1796,7 +1796,7 @@ static WCHAR cptbl_gbk[126][192] = {
   },
 };
 
-static WCHAR cptbl_big5[126][160] = {
+static const WCHAR cptbl_big5[126][160] = {
   {
     0xEEB8,0xEEB9,0xEEBA,0xEEBB,0xEEBC,0xEEBD,0xEEBE,0xEEBF,0xEEC0,0xEEC1,0xEEC2,0xEEC3,0xEEC4,0xEEC5,0xEEC6,0xEEC7,
     0xEEC8,0xEEC9,0xEECA,0xEECB,0xEECC,0xEECD,0xEECE,0xEECF,0xEED0,0xEED1,0xEED2,0xEED3,0xEED4,0xEED5,0xEED6,0xEED7,
@@ -3311,7 +3311,7 @@ static WCHAR cptbl_big5[126][160] = {
   },
 };
 /*
-static WCHAR cptbl_jis[60][192] = {
+static const WCHAR cptbl_jis[60][192] = {
   {
     0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B,0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,
     0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0xFF3C,
@@ -4154,7 +4154,7 @@ static WCHAR cptbl_jis[60][192] = {
   },
 };
 
-static WCHAR cptbl_jis_half[64] = {
+static const WCHAR cptbl_jis_half[64] = {
 	0xF8F0, 0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67,
 	0xFF68, 0xFF69, 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F,
 	0xFF70, 0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77,

+ 2 - 2
palcfg.c

@@ -143,8 +143,8 @@ PAL_ParseConfigLine(
 								pValue->iValue = gConfigItems[i].MaxValue.iValue;
 							break;
 						case PALCFG_BOOLEAN:
-							sscanf(ptr, "%d", &pValue->bValue);
-							pValue->bValue = pValue->bValue ? TRUE : FALSE;
+							sscanf(ptr, "%d", &pValue->iValue);
+							pValue->bValue = pValue->iValue ? TRUE : FALSE;
 							break;
 						case PALCFG_STRING:
 							//