ACPICA: Work around an ancient GCC bug.
authorBob Moore <robert.moore@intel.com>
Wed, 30 Jul 2014 04:20:26 +0000 (12:20 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 30 Jul 2014 22:50:22 +0000 (00:50 +0200)
warning: cast from function call of type 'char *' to non-matching type 'long unsigned int'

Since acpi_ut_format_number() hasn't been enabled for the Linux kernel,
this patch doesn't affect the Linux kernel.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/utprint.c

index 10311648f7014712502dda0df4625e65a8b2d27d..080e22aaba15e749ba93542ecce84bc9f91e79fd 100644 (file)
@@ -242,6 +242,7 @@ static char *acpi_ut_format_number(char *string,
                                   u64 number,
                                   u8 base, s32 width, s32 precision, u8 type)
 {
+       char *pos;
        char sign;
        char zero;
        u8 need_prefix;
@@ -289,9 +290,8 @@ static char *acpi_ut_format_number(char *string,
 
        /* Generate full string in reverse order */
 
-       i = ACPI_PTR_DIFF(acpi_ut_put_number
-                         (reversed_string, number, base, upper),
-                         reversed_string);
+       pos = acpi_ut_put_number(reversed_string, number, base, upper);
+       i = ACPI_PTR_DIFF(pos, reversed_string);
 
        /* Printing 100 using %2d gives "100", not "00" */
 
This page took 0.049762 seconds and 5 git commands to generate.