[POWRPROF_APITEST] Fix cppcheck warnings.

* test_CallNtPowerInformation(): Fix 2 'sizeof(sizeof())' copypastas
* test_ValidatePowerPolicies_Next(): Delete a duplicate line
This commit is contained in:
Serge Gautherie 2020-06-01 21:29:02 +02:00 committed by Thomas Faber
parent 0b9cbc5179
commit 02680ace4d
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -60,7 +60,7 @@ void test_CallNtPowerInformation(void)
/* LastSleepTime tests */
retval = CallNtPowerInformation(LastSleepTime, 0, 0, 0, 0);
ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval);
retval = CallNtPowerInformation(LastSleepTime, &atime, sizeof(sizeof(ULONGLONG)), 0, 0);
retval = CallNtPowerInformation(LastSleepTime, &atime, sizeof(ULONGLONG), 0, 0);
ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval);
retval = CallNtPowerInformation(LastSleepTime, &atime, sizeof(ULONGLONG), &ctime, sizeof(ULONGLONG));
ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval);
@ -70,7 +70,7 @@ void test_CallNtPowerInformation(void)
/* LastWakeTime tests */
retval = CallNtPowerInformation(LastWakeTime, 0, 0, 0, 0);
ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval);
retval = CallNtPowerInformation(LastWakeTime, &atime, sizeof(sizeof(ULONGLONG)), 0, 0);
retval = CallNtPowerInformation(LastWakeTime, &atime, sizeof(ULONGLONG), 0, 0);
ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval);
retval = CallNtPowerInformation(LastWakeTime, &atime, sizeof(ULONGLONG), &ctime, sizeof(ULONGLONG));
ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval);
@ -4621,7 +4621,6 @@ pPP_original->user.OptimizeForPowerDc=1;
ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError());
ok(globalcompare(gpp,gpp_compare),"Difference Found\n");
pp_compare.user.MaxSleepAc=4;
pp_compare.user.MaxSleepAc=4;
ok(compare(pp,pp_compare),"Difference Found\n");
pPP_original->user.MaxSleepAc=PowerSystemShutdown;