ACPICA: add type casts for string functions
authorBob Moore <robert.moore@intel.com>
Fri, 15 Jan 2021 18:48:21 +0000 (10:48 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 22 Jan 2021 14:51:53 +0000 (15:51 +0100)
Detected by gcc 10.2.0.

ACPICA commit 608559800e1ad48b819744aeb1866d94335e2655

Link: https://github.com/acpica/acpica/commit/60855980
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/dbinput.c
drivers/acpi/acpica/utstrsuppt.c

index 2952856b8a6755fba25f4f704c07aa9e6f695a0e..b8a48923064f5334a1c1b26eea4a49e5ce366273 100644 (file)
@@ -473,7 +473,7 @@ char *acpi_db_get_next_token(char *string,
 
        /* Remove any spaces at the beginning, ignore blank lines */
 
-       while (*string && isspace(*string)) {
+       while (*string && isspace((int)*string)) {
                string++;
        }
 
@@ -571,7 +571,7 @@ char *acpi_db_get_next_token(char *string,
 
                /* Find end of token */
 
-               while (*string && !isspace(*string)) {
+               while (*string && !isspace((int)*string)) {
                        string++;
                }
                break;
index 2d91003fcf265aea2978a7ae80876267f3b148cd..199982a6fb16f7a8f27134fa3f476fc0417cd7d1 100644 (file)
@@ -104,7 +104,7 @@ acpi_status acpi_ut_convert_decimal_string(char *string, u64 *return_value_ptr)
                 * 1) Runtime: terminate with no error, per the ACPI spec
                 * 2) Compiler: return an error
                 */
-               if (!isdigit(*string)) {
+               if (!isdigit((int)*string)) {
 #ifdef ACPI_ASL_COMPILER
                        status = AE_BAD_DECIMAL_CONSTANT;
 #endif
@@ -158,7 +158,7 @@ acpi_status acpi_ut_convert_hex_string(char *string, u64 *return_value_ptr)
                 * 1) Runtime: terminate with no error, per the ACPI spec
                 * 2) Compiler: return an error
                 */
-               if (!isxdigit(*string)) {
+               if (!isxdigit((int)*string)) {
 #ifdef ACPI_ASL_COMPILER
                        status = AE_BAD_HEX_CONSTANT;
 #endif