Message ID | 1376303350-4965-1-git-send-email-naresh.bhat@linaro.org |
---|---|
State | New |
Headers | show |
The casting here is problematic, it will break 32 bit builds. ACPI integers are UINT64 so I guess the underlying problem is in: src/acpica/source/include/platform/aclinux.h #if defined(__ia64__) || defined(__x86_64__) #define ACPI_MACHINE_WIDTH 64 #define COMPILER_DEPENDENT_INT64 long #define COMPILER_DEPENDENT_UINT64 unsigned long #else #define ACPI_MACHINE_WIDTH 32 #define COMPILER_DEPENDENT_INT64 long long #define COMPILER_DEPENDENT_UINT64 unsigned long long #define ACPI_USE_NATIVE_DIVIDE #endif .. perhaps you to add a defined( ) for aarch64 otherwise it defaults to 32 bit which causes these build issues. If that works then the fix needs to be also sent to the ACPICA mailing list too. Colin On 12/08/13 11:29, naresh.bhat@linaro.org wrote: > From: Naresh Bhat <naresh.bhat@linaro.org> > > Signed-off-by: Naresh Bhat<naresh.bhat@linaro.org> > > This patch fix all typecast warnings being treated as errors > occured while compiling on ARMv8 aarch64 architecture. > --- > src/acpi/method/method.c | 92 +++++++++++++++++++++++----------------------- > 1 file changed, 46 insertions(+), 46 deletions(-) > > diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c > index f46fdff..327a887 100644 > --- a/src/acpi/method/method.c > +++ b/src/acpi/method/method.c > @@ -976,14 +976,14 @@ static void method_test_HID_return( > tmp, sizeof(tmp))) > fwts_passed(fw, "%s returned an integer " > "0x%8.8" PRIx64 " (EISA ID %s).", > - name, obj->Integer.Value, tmp); > + name, (long unsigned int)obj->Integer.Value, tmp); > else > fwts_failed(fw, LOG_LEVEL_MEDIUM, > "MethodHIDInvalidInteger", > "%s returned a integer 0x%8.8" PRIx64 " " > "(EISA ID %s) but the this is not a valid " > "EISA ID encoded PNP ID.", > - name, obj->Integer.Value, tmp); > + name, (long unsigned int)obj->Integer.Value, tmp); > break; > default: > fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_HIDBadReturnType", > @@ -1865,7 +1865,7 @@ static void method_test_FIX_return( > "%s returned an integer " > "0x%8.8" PRIx64 " in package element " > "%" PRIu32 " that is not a valid " > - "EISA ID.", name, obj->Integer.Value, i); > + "EISA ID.", name, (long unsigned int)obj->Integer.Value, i); > failed = true; > } > } > @@ -2092,7 +2092,7 @@ static void method_test_SEG_return( > "%s returned value 0x%8.8" PRIx64 " and some of the " > "upper 16 reserved bits are set when they " > "should in fact be zero.", > - name, obj->Integer.Value); > + name, (long unsigned int)obj->Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > } else > method_passed_sane_uint64(fw, name, obj->Integer.Value); > @@ -2333,9 +2333,9 @@ static void method_test_Sx__return( > } > > fwts_log_info(fw, "%s PM1a_CNT.SLP_TYP value: 0x%8.8" PRIx64, name, > - obj->Package.Elements[0].Integer.Value); > + (long unsigned int)obj->Package.Elements[0].Integer.Value); > fwts_log_info(fw, "%s PM1b_CNT.SLP_TYP value: 0x%8.8" PRIx64, name, > - obj->Package.Elements[1].Integer.Value); > + (long unsigned int)obj->Package.Elements[1].Integer.Value); > > if (!failed) > method_passed_sane(fw, name, "package"); > @@ -2484,7 +2484,7 @@ static void method_test_CSD_return( > "%s sub-package %d element 0 (NumEntries) " > "was expected to have value 0x%" PRIx64 ".", > name, i, > - pkg->Package.Elements[0].Integer.Value); > + (long unsigned int)pkg->Package.Elements[0].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -2496,7 +2496,7 @@ static void method_test_CSD_return( > "was expected to have value 1, instead it " > "was 0x%" PRIx64 ".", > name, i, > - pkg->Package.Elements[1].Integer.Value); > + (long unsigned int)pkg->Package.Elements[1].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -2511,7 +2511,7 @@ static void method_test_CSD_return( > "0xfd (SW_ANY) or 0xfe (HW_ALL), instead it " > "was 0x%" PRIx64 ".", > name, i, > - pkg->Package.Elements[3].Integer.Value); > + (long unsigned int)pkg->Package.Elements[3].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -2581,7 +2581,7 @@ static void method_test_CST_return( > "%" PRIu32 " returned C state sub-elements yet _CST " > "reports it has %" PRIu64 " C states.", > name, obj->Package.Count - 1, > - obj->Package.Elements[0].Integer.Value); > + (long unsigned int)obj->Package.Elements[0].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > return; > } > @@ -2677,9 +2677,9 @@ static void method_test_CST_return( > fwts_log_info_verbatum(fw, > "%2" PRIu32 " C%" PRIu64 " %6" PRIu64 " %6" PRIu64, > i, > - pkg->Package.Elements[1].Integer.Value, > - pkg->Package.Elements[2].Integer.Value, > - pkg->Package.Elements[3].Integer.Value); > + (long unsigned int)pkg->Package.Elements[1].Integer.Value, > + (long unsigned int)pkg->Package.Elements[2].Integer.Value, > + (long unsigned int)pkg->Package.Elements[3].Integer.Value); > } else { > fwts_log_info_verbatum(fw, > "%2" PRIu32 " -- ----- -----", i); > @@ -2850,10 +2850,10 @@ static void method_test_PSS_return( > fwts_log_info_verbatum(fw, " %3d %7" PRIu64 " %8" PRIu64 > " %5" PRIu64 " %5" PRIu64, > i, > - pstate->Package.Elements[0].Integer.Value, > - pstate->Package.Elements[1].Integer.Value, > - pstate->Package.Elements[2].Integer.Value, > - pstate->Package.Elements[3].Integer.Value); > + (long unsigned int)pstate->Package.Elements[0].Integer.Value, > + (long unsigned int)pstate->Package.Elements[1].Integer.Value, > + (long unsigned int)pstate->Package.Elements[2].Integer.Value, > + (long unsigned int)pstate->Package.Elements[3].Integer.Value); > } else { > fwts_log_info_verbatum(fw, > " %3d ---- ----- -- -- (invalid)", i); > @@ -3004,7 +3004,7 @@ static void method_test_TSD_return( > " element 0 (NumEntries) " > "was expected to have value 0x%" PRIx64 ".", > name, i, > - pkg->Package.Elements[0].Integer.Value); > + (long unsigned int)pkg->Package.Elements[0].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3017,7 +3017,7 @@ static void method_test_TSD_return( > "was expected to have value 1, instead it " > "was 0x%" PRIx64 ".", > name, i, > - pkg->Package.Elements[1].Integer.Value); > + (long unsigned int)pkg->Package.Elements[1].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3033,7 +3033,7 @@ static void method_test_TSD_return( > "0xfd (SW_ANY) or 0xfe (HW_ALL), instead it " > "was 0x%" PRIx64 ".", > name, i, > - pkg->Package.Elements[3].Integer.Value); > + (long unsigned int)pkg->Package.Elements[3].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3140,7 +3140,7 @@ static void method_test_TSS_return( > "was expected to have value 1..100, instead " > "was %" PRIu64 ".", > name, i, > - pkg->Package.Elements[0].Integer.Value); > + (long unsigned int)pkg->Package.Elements[0].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3159,11 +3159,11 @@ static void method_test_TSS_return( > fwts_log_info_verbatum(fw, > " %3d %3" PRIu64 "%% %7" PRIu64 " %7" PRIu64 > " %2.2" PRIx64 " %2.2" PRIx64, i, > - pkg->Package.Elements[0].Integer.Value, > - pkg->Package.Elements[1].Integer.Value, > - pkg->Package.Elements[2].Integer.Value, > - pkg->Package.Elements[3].Integer.Value, > - pkg->Package.Elements[4].Integer.Value); > + (long unsigned int)pkg->Package.Elements[0].Integer.Value, > + (long unsigned int)pkg->Package.Elements[1].Integer.Value, > + (long unsigned int)pkg->Package.Elements[2].Integer.Value, > + (long unsigned int)pkg->Package.Elements[3].Integer.Value, > + (long unsigned int)pkg->Package.Elements[4].Integer.Value); > } else { > fwts_log_info_verbatum(fw, > " %3d ---- ----- ----- -- -- (invalid)", i); > @@ -3243,7 +3243,7 @@ static void method_test_GCP_return( > "%s returned %" PRId64 ", should be between 0 and 15, " > "one or more of the reserved bits 4..31 seem " > "to be set.", > - name, obj->Integer.Value); > + name, (long unsigned int)obj->Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > } else > method_passed_sane_uint64(fw, name, obj->Integer.Value); > @@ -3308,7 +3308,7 @@ static void method_test_GWS_return( > "%s returned %" PRIu64 ", should be between 0 and 3, " > "one or more of the reserved bits 2..31 seem " > "to be set.", > - name, obj->Integer.Value); > + name, (long unsigned int)obj->Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > } else > method_passed_sane_uint64(fw, name, obj->Integer.Value); > @@ -3400,13 +3400,13 @@ static void method_test_SBS_return( > switch (obj->Integer.Value) { > case 0 ... 4: > fwts_passed(fw, "%s correctly returned value %" PRIu64 " %s", > - name, obj->Integer.Value, > + name, (long unsigned int)obj->Integer.Value, > sbs_info[obj->Integer.Value]); > break; > default: > fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_SBSReturn", > "%s returned %" PRIu64 ", should be between 0 and 4.", > - name, obj->Integer.Value); > + name, (long unsigned int)obj->Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > fwts_advice(fw, > "Smart Battery %s is incorrectly informing " > @@ -3485,7 +3485,7 @@ static void method_test_BIF_return( > "Method_BIFBadUnits", > "%s: Expected Power Unit (Element 0) to be " > "0 (mWh) or 1 (mAh), got 0x%8.8" PRIx64 ".", > - name, obj->Package.Elements[0].Integer.Value); > + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3522,7 +3522,7 @@ static void method_test_BIF_return( > "%s: Expected Battery Technology Unit " > "(Element 3) to be 0 (Primary) or 1 " > "(Secondary), got 0x%8.8" PRIx64 ".", > - name, obj->Package.Elements[3].Integer.Value); > + name, (long unsigned int)obj->Package.Elements[3].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3630,7 +3630,7 @@ static void method_test_BIX_return( > "%s: Expected %s (Element 1) to be " > "0 (mWh) or 1 (mAh), got 0x%8.8" PRIx64 ".", > name, elements[1].name, > - obj->Package.Elements[1].Integer.Value); > + (long unsigned int)obj->Package.Elements[1].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3670,7 +3670,7 @@ static void method_test_BIX_return( > "(Element 4) to be 0 (Primary) or 1 " > "(Secondary), got 0x%8.8" PRIx64 ".", > name, elements[4].name, > - obj->Package.Elements[4].Integer.Value); > + (long unsigned int)obj->Package.Elements[4].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3786,7 +3786,7 @@ static void method_test_BST_return( > "Method_BSTBadState", > "%s: Expected Battery State (Element 0) to " > "be 0..7, got 0x%8.8" PRIx64 ".", > - name, obj->Package.Elements[0].Integer.Value); > + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3797,7 +3797,7 @@ static void method_test_BST_return( > "%s: Battery State (Element 0) is " > "indicating both charging and discharginng " > "which is not allowed. Got value 0x%8.8" PRIx64 ".", > - name, obj->Package.Elements[0].Integer.Value); > + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -3943,7 +3943,7 @@ static void method_test_PSR_return( > "Method_PSRZeroOrOne", > "%s returned 0x%8.8" PRIx64 ", expected 0 " > "(offline) or 1 (online)", > - name, obj->Integer.Value); > + name, (long unsigned int)obj->Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > } else > method_passed_sane_uint64(fw, name, obj->Integer.Value); > @@ -4117,7 +4117,7 @@ static void method_test_THERM_return( > "%s correctly returned sane looking " > "value 0x%8.8" PRIx64 " (%5.1f degrees K)", > method, > - obj->Integer.Value, > + (long unsigned int)obj->Integer.Value, > (float)((uint64_t)obj->Integer.Value) / 10.0); > } else { > fwts_failed(fw, LOG_LEVEL_MEDIUM, > @@ -4126,7 +4126,7 @@ static void method_test_THERM_return( > "0 degrees C: 0x%8.8" PRIx64 " (%5.1f " > "degrees K)", > method, > - obj->Integer.Value, > + (long unsigned int)obj->Integer.Value, > (float)((uint64_t)obj->Integer.Value) / 10.0); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > fwts_advice(fw, > @@ -4596,8 +4596,8 @@ static void method_test_BCL_return( > " power (%" PRIu64 ") is less than " > "brightness level when on " > "battery power (%" PRIu64 ").", > - obj->Package.Elements[0].Integer.Value, > - obj->Package.Elements[1].Integer.Value); > + (long unsigned int)obj->Package.Elements[0].Integer.Value, > + (long unsigned int)obj->Package.Elements[1].Integer.Value); > fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); > failed = true; > } > @@ -4611,8 +4611,8 @@ static void method_test_BCL_return( > "than brightness level %" PRIu64 > " (index %d" PRIu32 "), should " > "be in ascending order.", > - obj->Package.Elements[i].Integer.Value, i, > - obj->Package.Elements[i+1].Integer.Value, i+1); > + (long unsigned int)obj->Package.Elements[i].Integer.Value, i, > + (long unsigned int)obj->Package.Elements[i+1].Integer.Value, i+1); > ascending_levels = true; > failed = true; > } > @@ -4629,14 +4629,14 @@ static void method_test_BCL_return( > } > > fwts_log_info(fw, "Brightness levels for %s:" ,name); > - fwts_log_info_verbatum(fw, " Level on full power : %" PRIu64, obj->Package.Elements[0].Integer.Value); > - fwts_log_info_verbatum(fw, " Level on battery power: %" PRIu64, obj->Package.Elements[1].Integer.Value); > + fwts_log_info_verbatum(fw, " Level on full power : %" PRIu64, (long unsigned int)obj->Package.Elements[0].Integer.Value); > + fwts_log_info_verbatum(fw, " Level on battery power: %" PRIu64, (long unsigned int)obj->Package.Elements[1].Integer.Value); > for (i = 2; i < obj->Package.Count; i++) { > char tmp[12]; > > snprintf(tmp, sizeof(tmp), "%s%" PRIu64, > i == 2 ? "" : ", ", > - obj->Package.Elements[i].Integer.Value); > + (long unsigned int)obj->Package.Elements[i].Integer.Value); > str = fwts_realloc_strcat(str, tmp); > if (!str) > break; >
Hi Colin Ian King, Thank you very much. I will do the needful and re-work on it. Regards -Naresh Bhat On 12 August 2013 21:50, Colin Ian King <colin.king@canonical.com> wrote: > The casting here is problematic, it will break 32 bit builds. ACPI > integers are UINT64 so I guess the underlying problem is in: > src/acpica/source/include/platform/aclinux.h > > #if defined(__ia64__) || defined(__x86_64__) > #define ACPI_MACHINE_WIDTH 64 > #define COMPILER_DEPENDENT_INT64 long > #define COMPILER_DEPENDENT_UINT64 unsigned long > #else > #define ACPI_MACHINE_WIDTH 32 > #define COMPILER_DEPENDENT_INT64 long long > #define COMPILER_DEPENDENT_UINT64 unsigned long long > #define ACPI_USE_NATIVE_DIVIDE > #endif > > .. perhaps you to add a defined( ) for aarch64 otherwise it defaults to > 32 bit which causes these build issues. > > If that works then the fix needs to be also sent to the ACPICA mailing > list too. > > Colin > > On 12/08/13 11:29, naresh.bhat@linaro.org wrote: >> From: Naresh Bhat <naresh.bhat@linaro.org> >> >> Signed-off-by: Naresh Bhat<naresh.bhat@linaro.org> >> >> This patch fix all typecast warnings being treated as errors >> occured while compiling on ARMv8 aarch64 architecture. >> --- >> src/acpi/method/method.c | 92 +++++++++++++++++++++++----------------------- >> 1 file changed, 46 insertions(+), 46 deletions(-) >> >> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c >> index f46fdff..327a887 100644 >> --- a/src/acpi/method/method.c >> +++ b/src/acpi/method/method.c >> @@ -976,14 +976,14 @@ static void method_test_HID_return( >> tmp, sizeof(tmp))) >> fwts_passed(fw, "%s returned an integer " >> "0x%8.8" PRIx64 " (EISA ID %s).", >> - name, obj->Integer.Value, tmp); >> + name, (long unsigned int)obj->Integer.Value, tmp); >> else >> fwts_failed(fw, LOG_LEVEL_MEDIUM, >> "MethodHIDInvalidInteger", >> "%s returned a integer 0x%8.8" PRIx64 " " >> "(EISA ID %s) but the this is not a valid " >> "EISA ID encoded PNP ID.", >> - name, obj->Integer.Value, tmp); >> + name, (long unsigned int)obj->Integer.Value, tmp); >> break; >> default: >> fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_HIDBadReturnType", >> @@ -1865,7 +1865,7 @@ static void method_test_FIX_return( >> "%s returned an integer " >> "0x%8.8" PRIx64 " in package element " >> "%" PRIu32 " that is not a valid " >> - "EISA ID.", name, obj->Integer.Value, i); >> + "EISA ID.", name, (long unsigned int)obj->Integer.Value, i); >> failed = true; >> } >> } >> @@ -2092,7 +2092,7 @@ static void method_test_SEG_return( >> "%s returned value 0x%8.8" PRIx64 " and some of the " >> "upper 16 reserved bits are set when they " >> "should in fact be zero.", >> - name, obj->Integer.Value); >> + name, (long unsigned int)obj->Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> } else >> method_passed_sane_uint64(fw, name, obj->Integer.Value); >> @@ -2333,9 +2333,9 @@ static void method_test_Sx__return( >> } >> >> fwts_log_info(fw, "%s PM1a_CNT.SLP_TYP value: 0x%8.8" PRIx64, name, >> - obj->Package.Elements[0].Integer.Value); >> + (long unsigned int)obj->Package.Elements[0].Integer.Value); >> fwts_log_info(fw, "%s PM1b_CNT.SLP_TYP value: 0x%8.8" PRIx64, name, >> - obj->Package.Elements[1].Integer.Value); >> + (long unsigned int)obj->Package.Elements[1].Integer.Value); >> >> if (!failed) >> method_passed_sane(fw, name, "package"); >> @@ -2484,7 +2484,7 @@ static void method_test_CSD_return( >> "%s sub-package %d element 0 (NumEntries) " >> "was expected to have value 0x%" PRIx64 ".", >> name, i, >> - pkg->Package.Elements[0].Integer.Value); >> + (long unsigned int)pkg->Package.Elements[0].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -2496,7 +2496,7 @@ static void method_test_CSD_return( >> "was expected to have value 1, instead it " >> "was 0x%" PRIx64 ".", >> name, i, >> - pkg->Package.Elements[1].Integer.Value); >> + (long unsigned int)pkg->Package.Elements[1].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -2511,7 +2511,7 @@ static void method_test_CSD_return( >> "0xfd (SW_ANY) or 0xfe (HW_ALL), instead it " >> "was 0x%" PRIx64 ".", >> name, i, >> - pkg->Package.Elements[3].Integer.Value); >> + (long unsigned int)pkg->Package.Elements[3].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -2581,7 +2581,7 @@ static void method_test_CST_return( >> "%" PRIu32 " returned C state sub-elements yet _CST " >> "reports it has %" PRIu64 " C states.", >> name, obj->Package.Count - 1, >> - obj->Package.Elements[0].Integer.Value); >> + (long unsigned int)obj->Package.Elements[0].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> return; >> } >> @@ -2677,9 +2677,9 @@ static void method_test_CST_return( >> fwts_log_info_verbatum(fw, >> "%2" PRIu32 " C%" PRIu64 " %6" PRIu64 " %6" PRIu64, >> i, >> - pkg->Package.Elements[1].Integer.Value, >> - pkg->Package.Elements[2].Integer.Value, >> - pkg->Package.Elements[3].Integer.Value); >> + (long unsigned int)pkg->Package.Elements[1].Integer.Value, >> + (long unsigned int)pkg->Package.Elements[2].Integer.Value, >> + (long unsigned int)pkg->Package.Elements[3].Integer.Value); >> } else { >> fwts_log_info_verbatum(fw, >> "%2" PRIu32 " -- ----- -----", i); >> @@ -2850,10 +2850,10 @@ static void method_test_PSS_return( >> fwts_log_info_verbatum(fw, " %3d %7" PRIu64 " %8" PRIu64 >> " %5" PRIu64 " %5" PRIu64, >> i, >> - pstate->Package.Elements[0].Integer.Value, >> - pstate->Package.Elements[1].Integer.Value, >> - pstate->Package.Elements[2].Integer.Value, >> - pstate->Package.Elements[3].Integer.Value); >> + (long unsigned int)pstate->Package.Elements[0].Integer.Value, >> + (long unsigned int)pstate->Package.Elements[1].Integer.Value, >> + (long unsigned int)pstate->Package.Elements[2].Integer.Value, >> + (long unsigned int)pstate->Package.Elements[3].Integer.Value); >> } else { >> fwts_log_info_verbatum(fw, >> " %3d ---- ----- -- -- (invalid)", i); >> @@ -3004,7 +3004,7 @@ static void method_test_TSD_return( >> " element 0 (NumEntries) " >> "was expected to have value 0x%" PRIx64 ".", >> name, i, >> - pkg->Package.Elements[0].Integer.Value); >> + (long unsigned int)pkg->Package.Elements[0].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3017,7 +3017,7 @@ static void method_test_TSD_return( >> "was expected to have value 1, instead it " >> "was 0x%" PRIx64 ".", >> name, i, >> - pkg->Package.Elements[1].Integer.Value); >> + (long unsigned int)pkg->Package.Elements[1].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3033,7 +3033,7 @@ static void method_test_TSD_return( >> "0xfd (SW_ANY) or 0xfe (HW_ALL), instead it " >> "was 0x%" PRIx64 ".", >> name, i, >> - pkg->Package.Elements[3].Integer.Value); >> + (long unsigned int)pkg->Package.Elements[3].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3140,7 +3140,7 @@ static void method_test_TSS_return( >> "was expected to have value 1..100, instead " >> "was %" PRIu64 ".", >> name, i, >> - pkg->Package.Elements[0].Integer.Value); >> + (long unsigned int)pkg->Package.Elements[0].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3159,11 +3159,11 @@ static void method_test_TSS_return( >> fwts_log_info_verbatum(fw, >> " %3d %3" PRIu64 "%% %7" PRIu64 " %7" PRIu64 >> " %2.2" PRIx64 " %2.2" PRIx64, i, >> - pkg->Package.Elements[0].Integer.Value, >> - pkg->Package.Elements[1].Integer.Value, >> - pkg->Package.Elements[2].Integer.Value, >> - pkg->Package.Elements[3].Integer.Value, >> - pkg->Package.Elements[4].Integer.Value); >> + (long unsigned int)pkg->Package.Elements[0].Integer.Value, >> + (long unsigned int)pkg->Package.Elements[1].Integer.Value, >> + (long unsigned int)pkg->Package.Elements[2].Integer.Value, >> + (long unsigned int)pkg->Package.Elements[3].Integer.Value, >> + (long unsigned int)pkg->Package.Elements[4].Integer.Value); >> } else { >> fwts_log_info_verbatum(fw, >> " %3d ---- ----- ----- -- -- (invalid)", i); >> @@ -3243,7 +3243,7 @@ static void method_test_GCP_return( >> "%s returned %" PRId64 ", should be between 0 and 15, " >> "one or more of the reserved bits 4..31 seem " >> "to be set.", >> - name, obj->Integer.Value); >> + name, (long unsigned int)obj->Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> } else >> method_passed_sane_uint64(fw, name, obj->Integer.Value); >> @@ -3308,7 +3308,7 @@ static void method_test_GWS_return( >> "%s returned %" PRIu64 ", should be between 0 and 3, " >> "one or more of the reserved bits 2..31 seem " >> "to be set.", >> - name, obj->Integer.Value); >> + name, (long unsigned int)obj->Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> } else >> method_passed_sane_uint64(fw, name, obj->Integer.Value); >> @@ -3400,13 +3400,13 @@ static void method_test_SBS_return( >> switch (obj->Integer.Value) { >> case 0 ... 4: >> fwts_passed(fw, "%s correctly returned value %" PRIu64 " %s", >> - name, obj->Integer.Value, >> + name, (long unsigned int)obj->Integer.Value, >> sbs_info[obj->Integer.Value]); >> break; >> default: >> fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_SBSReturn", >> "%s returned %" PRIu64 ", should be between 0 and 4.", >> - name, obj->Integer.Value); >> + name, (long unsigned int)obj->Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> fwts_advice(fw, >> "Smart Battery %s is incorrectly informing " >> @@ -3485,7 +3485,7 @@ static void method_test_BIF_return( >> "Method_BIFBadUnits", >> "%s: Expected Power Unit (Element 0) to be " >> "0 (mWh) or 1 (mAh), got 0x%8.8" PRIx64 ".", >> - name, obj->Package.Elements[0].Integer.Value); >> + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3522,7 +3522,7 @@ static void method_test_BIF_return( >> "%s: Expected Battery Technology Unit " >> "(Element 3) to be 0 (Primary) or 1 " >> "(Secondary), got 0x%8.8" PRIx64 ".", >> - name, obj->Package.Elements[3].Integer.Value); >> + name, (long unsigned int)obj->Package.Elements[3].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3630,7 +3630,7 @@ static void method_test_BIX_return( >> "%s: Expected %s (Element 1) to be " >> "0 (mWh) or 1 (mAh), got 0x%8.8" PRIx64 ".", >> name, elements[1].name, >> - obj->Package.Elements[1].Integer.Value); >> + (long unsigned int)obj->Package.Elements[1].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3670,7 +3670,7 @@ static void method_test_BIX_return( >> "(Element 4) to be 0 (Primary) or 1 " >> "(Secondary), got 0x%8.8" PRIx64 ".", >> name, elements[4].name, >> - obj->Package.Elements[4].Integer.Value); >> + (long unsigned int)obj->Package.Elements[4].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3786,7 +3786,7 @@ static void method_test_BST_return( >> "Method_BSTBadState", >> "%s: Expected Battery State (Element 0) to " >> "be 0..7, got 0x%8.8" PRIx64 ".", >> - name, obj->Package.Elements[0].Integer.Value); >> + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3797,7 +3797,7 @@ static void method_test_BST_return( >> "%s: Battery State (Element 0) is " >> "indicating both charging and discharginng " >> "which is not allowed. Got value 0x%8.8" PRIx64 ".", >> - name, obj->Package.Elements[0].Integer.Value); >> + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -3943,7 +3943,7 @@ static void method_test_PSR_return( >> "Method_PSRZeroOrOne", >> "%s returned 0x%8.8" PRIx64 ", expected 0 " >> "(offline) or 1 (online)", >> - name, obj->Integer.Value); >> + name, (long unsigned int)obj->Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> } else >> method_passed_sane_uint64(fw, name, obj->Integer.Value); >> @@ -4117,7 +4117,7 @@ static void method_test_THERM_return( >> "%s correctly returned sane looking " >> "value 0x%8.8" PRIx64 " (%5.1f degrees K)", >> method, >> - obj->Integer.Value, >> + (long unsigned int)obj->Integer.Value, >> (float)((uint64_t)obj->Integer.Value) / 10.0); >> } else { >> fwts_failed(fw, LOG_LEVEL_MEDIUM, >> @@ -4126,7 +4126,7 @@ static void method_test_THERM_return( >> "0 degrees C: 0x%8.8" PRIx64 " (%5.1f " >> "degrees K)", >> method, >> - obj->Integer.Value, >> + (long unsigned int)obj->Integer.Value, >> (float)((uint64_t)obj->Integer.Value) / 10.0); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> fwts_advice(fw, >> @@ -4596,8 +4596,8 @@ static void method_test_BCL_return( >> " power (%" PRIu64 ") is less than " >> "brightness level when on " >> "battery power (%" PRIu64 ").", >> - obj->Package.Elements[0].Integer.Value, >> - obj->Package.Elements[1].Integer.Value); >> + (long unsigned int)obj->Package.Elements[0].Integer.Value, >> + (long unsigned int)obj->Package.Elements[1].Integer.Value); >> fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); >> failed = true; >> } >> @@ -4611,8 +4611,8 @@ static void method_test_BCL_return( >> "than brightness level %" PRIu64 >> " (index %d" PRIu32 "), should " >> "be in ascending order.", >> - obj->Package.Elements[i].Integer.Value, i, >> - obj->Package.Elements[i+1].Integer.Value, i+1); >> + (long unsigned int)obj->Package.Elements[i].Integer.Value, i, >> + (long unsigned int)obj->Package.Elements[i+1].Integer.Value, i+1); >> ascending_levels = true; >> failed = true; >> } >> @@ -4629,14 +4629,14 @@ static void method_test_BCL_return( >> } >> >> fwts_log_info(fw, "Brightness levels for %s:" ,name); >> - fwts_log_info_verbatum(fw, " Level on full power : %" PRIu64, obj->Package.Elements[0].Integer.Value); >> - fwts_log_info_verbatum(fw, " Level on battery power: %" PRIu64, obj->Package.Elements[1].Integer.Value); >> + fwts_log_info_verbatum(fw, " Level on full power : %" PRIu64, (long unsigned int)obj->Package.Elements[0].Integer.Value); >> + fwts_log_info_verbatum(fw, " Level on battery power: %" PRIu64, (long unsigned int)obj->Package.Elements[1].Integer.Value); >> for (i = 2; i < obj->Package.Count; i++) { >> char tmp[12]; >> >> snprintf(tmp, sizeof(tmp), "%s%" PRIu64, >> i == 2 ? "" : ", ", >> - obj->Package.Elements[i].Integer.Value); >> + (long unsigned int)obj->Package.Elements[i].Integer.Value); >> str = fwts_realloc_strcat(str, tmp); >> if (!str) >> break; >> >
diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index f46fdff..327a887 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -976,14 +976,14 @@ static void method_test_HID_return( tmp, sizeof(tmp))) fwts_passed(fw, "%s returned an integer " "0x%8.8" PRIx64 " (EISA ID %s).", - name, obj->Integer.Value, tmp); + name, (long unsigned int)obj->Integer.Value, tmp); else fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodHIDInvalidInteger", "%s returned a integer 0x%8.8" PRIx64 " " "(EISA ID %s) but the this is not a valid " "EISA ID encoded PNP ID.", - name, obj->Integer.Value, tmp); + name, (long unsigned int)obj->Integer.Value, tmp); break; default: fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_HIDBadReturnType", @@ -1865,7 +1865,7 @@ static void method_test_FIX_return( "%s returned an integer " "0x%8.8" PRIx64 " in package element " "%" PRIu32 " that is not a valid " - "EISA ID.", name, obj->Integer.Value, i); + "EISA ID.", name, (long unsigned int)obj->Integer.Value, i); failed = true; } } @@ -2092,7 +2092,7 @@ static void method_test_SEG_return( "%s returned value 0x%8.8" PRIx64 " and some of the " "upper 16 reserved bits are set when they " "should in fact be zero.", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); } else method_passed_sane_uint64(fw, name, obj->Integer.Value); @@ -2333,9 +2333,9 @@ static void method_test_Sx__return( } fwts_log_info(fw, "%s PM1a_CNT.SLP_TYP value: 0x%8.8" PRIx64, name, - obj->Package.Elements[0].Integer.Value); + (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_log_info(fw, "%s PM1b_CNT.SLP_TYP value: 0x%8.8" PRIx64, name, - obj->Package.Elements[1].Integer.Value); + (long unsigned int)obj->Package.Elements[1].Integer.Value); if (!failed) method_passed_sane(fw, name, "package"); @@ -2484,7 +2484,7 @@ static void method_test_CSD_return( "%s sub-package %d element 0 (NumEntries) " "was expected to have value 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[0].Integer.Value); + (long unsigned int)pkg->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -2496,7 +2496,7 @@ static void method_test_CSD_return( "was expected to have value 1, instead it " "was 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[1].Integer.Value); + (long unsigned int)pkg->Package.Elements[1].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -2511,7 +2511,7 @@ static void method_test_CSD_return( "0xfd (SW_ANY) or 0xfe (HW_ALL), instead it " "was 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[3].Integer.Value); + (long unsigned int)pkg->Package.Elements[3].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -2581,7 +2581,7 @@ static void method_test_CST_return( "%" PRIu32 " returned C state sub-elements yet _CST " "reports it has %" PRIu64 " C states.", name, obj->Package.Count - 1, - obj->Package.Elements[0].Integer.Value); + (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); return; } @@ -2677,9 +2677,9 @@ static void method_test_CST_return( fwts_log_info_verbatum(fw, "%2" PRIu32 " C%" PRIu64 " %6" PRIu64 " %6" PRIu64, i, - pkg->Package.Elements[1].Integer.Value, - pkg->Package.Elements[2].Integer.Value, - pkg->Package.Elements[3].Integer.Value); + (long unsigned int)pkg->Package.Elements[1].Integer.Value, + (long unsigned int)pkg->Package.Elements[2].Integer.Value, + (long unsigned int)pkg->Package.Elements[3].Integer.Value); } else { fwts_log_info_verbatum(fw, "%2" PRIu32 " -- ----- -----", i); @@ -2850,10 +2850,10 @@ static void method_test_PSS_return( fwts_log_info_verbatum(fw, " %3d %7" PRIu64 " %8" PRIu64 " %5" PRIu64 " %5" PRIu64, i, - pstate->Package.Elements[0].Integer.Value, - pstate->Package.Elements[1].Integer.Value, - pstate->Package.Elements[2].Integer.Value, - pstate->Package.Elements[3].Integer.Value); + (long unsigned int)pstate->Package.Elements[0].Integer.Value, + (long unsigned int)pstate->Package.Elements[1].Integer.Value, + (long unsigned int)pstate->Package.Elements[2].Integer.Value, + (long unsigned int)pstate->Package.Elements[3].Integer.Value); } else { fwts_log_info_verbatum(fw, " %3d ---- ----- -- -- (invalid)", i); @@ -3004,7 +3004,7 @@ static void method_test_TSD_return( " element 0 (NumEntries) " "was expected to have value 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[0].Integer.Value); + (long unsigned int)pkg->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3017,7 +3017,7 @@ static void method_test_TSD_return( "was expected to have value 1, instead it " "was 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[1].Integer.Value); + (long unsigned int)pkg->Package.Elements[1].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3033,7 +3033,7 @@ static void method_test_TSD_return( "0xfd (SW_ANY) or 0xfe (HW_ALL), instead it " "was 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[3].Integer.Value); + (long unsigned int)pkg->Package.Elements[3].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3140,7 +3140,7 @@ static void method_test_TSS_return( "was expected to have value 1..100, instead " "was %" PRIu64 ".", name, i, - pkg->Package.Elements[0].Integer.Value); + (long unsigned int)pkg->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3159,11 +3159,11 @@ static void method_test_TSS_return( fwts_log_info_verbatum(fw, " %3d %3" PRIu64 "%% %7" PRIu64 " %7" PRIu64 " %2.2" PRIx64 " %2.2" PRIx64, i, - pkg->Package.Elements[0].Integer.Value, - pkg->Package.Elements[1].Integer.Value, - pkg->Package.Elements[2].Integer.Value, - pkg->Package.Elements[3].Integer.Value, - pkg->Package.Elements[4].Integer.Value); + (long unsigned int)pkg->Package.Elements[0].Integer.Value, + (long unsigned int)pkg->Package.Elements[1].Integer.Value, + (long unsigned int)pkg->Package.Elements[2].Integer.Value, + (long unsigned int)pkg->Package.Elements[3].Integer.Value, + (long unsigned int)pkg->Package.Elements[4].Integer.Value); } else { fwts_log_info_verbatum(fw, " %3d ---- ----- ----- -- -- (invalid)", i); @@ -3243,7 +3243,7 @@ static void method_test_GCP_return( "%s returned %" PRId64 ", should be between 0 and 15, " "one or more of the reserved bits 4..31 seem " "to be set.", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); } else method_passed_sane_uint64(fw, name, obj->Integer.Value); @@ -3308,7 +3308,7 @@ static void method_test_GWS_return( "%s returned %" PRIu64 ", should be between 0 and 3, " "one or more of the reserved bits 2..31 seem " "to be set.", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); } else method_passed_sane_uint64(fw, name, obj->Integer.Value); @@ -3400,13 +3400,13 @@ static void method_test_SBS_return( switch (obj->Integer.Value) { case 0 ... 4: fwts_passed(fw, "%s correctly returned value %" PRIu64 " %s", - name, obj->Integer.Value, + name, (long unsigned int)obj->Integer.Value, sbs_info[obj->Integer.Value]); break; default: fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_SBSReturn", "%s returned %" PRIu64 ", should be between 0 and 4.", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); fwts_advice(fw, "Smart Battery %s is incorrectly informing " @@ -3485,7 +3485,7 @@ static void method_test_BIF_return( "Method_BIFBadUnits", "%s: Expected Power Unit (Element 0) to be " "0 (mWh) or 1 (mAh), got 0x%8.8" PRIx64 ".", - name, obj->Package.Elements[0].Integer.Value); + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3522,7 +3522,7 @@ static void method_test_BIF_return( "%s: Expected Battery Technology Unit " "(Element 3) to be 0 (Primary) or 1 " "(Secondary), got 0x%8.8" PRIx64 ".", - name, obj->Package.Elements[3].Integer.Value); + name, (long unsigned int)obj->Package.Elements[3].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3630,7 +3630,7 @@ static void method_test_BIX_return( "%s: Expected %s (Element 1) to be " "0 (mWh) or 1 (mAh), got 0x%8.8" PRIx64 ".", name, elements[1].name, - obj->Package.Elements[1].Integer.Value); + (long unsigned int)obj->Package.Elements[1].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3670,7 +3670,7 @@ static void method_test_BIX_return( "(Element 4) to be 0 (Primary) or 1 " "(Secondary), got 0x%8.8" PRIx64 ".", name, elements[4].name, - obj->Package.Elements[4].Integer.Value); + (long unsigned int)obj->Package.Elements[4].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3786,7 +3786,7 @@ static void method_test_BST_return( "Method_BSTBadState", "%s: Expected Battery State (Element 0) to " "be 0..7, got 0x%8.8" PRIx64 ".", - name, obj->Package.Elements[0].Integer.Value); + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3797,7 +3797,7 @@ static void method_test_BST_return( "%s: Battery State (Element 0) is " "indicating both charging and discharginng " "which is not allowed. Got value 0x%8.8" PRIx64 ".", - name, obj->Package.Elements[0].Integer.Value); + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3943,7 +3943,7 @@ static void method_test_PSR_return( "Method_PSRZeroOrOne", "%s returned 0x%8.8" PRIx64 ", expected 0 " "(offline) or 1 (online)", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); } else method_passed_sane_uint64(fw, name, obj->Integer.Value); @@ -4117,7 +4117,7 @@ static void method_test_THERM_return( "%s correctly returned sane looking " "value 0x%8.8" PRIx64 " (%5.1f degrees K)", method, - obj->Integer.Value, + (long unsigned int)obj->Integer.Value, (float)((uint64_t)obj->Integer.Value) / 10.0); } else { fwts_failed(fw, LOG_LEVEL_MEDIUM, @@ -4126,7 +4126,7 @@ static void method_test_THERM_return( "0 degrees C: 0x%8.8" PRIx64 " (%5.1f " "degrees K)", method, - obj->Integer.Value, + (long unsigned int)obj->Integer.Value, (float)((uint64_t)obj->Integer.Value) / 10.0); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); fwts_advice(fw, @@ -4596,8 +4596,8 @@ static void method_test_BCL_return( " power (%" PRIu64 ") is less than " "brightness level when on " "battery power (%" PRIu64 ").", - obj->Package.Elements[0].Integer.Value, - obj->Package.Elements[1].Integer.Value); + (long unsigned int)obj->Package.Elements[0].Integer.Value, + (long unsigned int)obj->Package.Elements[1].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -4611,8 +4611,8 @@ static void method_test_BCL_return( "than brightness level %" PRIu64 " (index %d" PRIu32 "), should " "be in ascending order.", - obj->Package.Elements[i].Integer.Value, i, - obj->Package.Elements[i+1].Integer.Value, i+1); + (long unsigned int)obj->Package.Elements[i].Integer.Value, i, + (long unsigned int)obj->Package.Elements[i+1].Integer.Value, i+1); ascending_levels = true; failed = true; } @@ -4629,14 +4629,14 @@ static void method_test_BCL_return( } fwts_log_info(fw, "Brightness levels for %s:" ,name); - fwts_log_info_verbatum(fw, " Level on full power : %" PRIu64, obj->Package.Elements[0].Integer.Value); - fwts_log_info_verbatum(fw, " Level on battery power: %" PRIu64, obj->Package.Elements[1].Integer.Value); + fwts_log_info_verbatum(fw, " Level on full power : %" PRIu64, (long unsigned int)obj->Package.Elements[0].Integer.Value); + fwts_log_info_verbatum(fw, " Level on battery power: %" PRIu64, (long unsigned int)obj->Package.Elements[1].Integer.Value); for (i = 2; i < obj->Package.Count; i++) { char tmp[12]; snprintf(tmp, sizeof(tmp), "%s%" PRIu64, i == 2 ? "" : ", ", - obj->Package.Elements[i].Integer.Value); + (long unsigned int)obj->Package.Elements[i].Integer.Value); str = fwts_realloc_strcat(str, tmp); if (!str) break;