Skip to content

Commit 5d58a6a

Browse files
author
Colin Stolley
committed
clean up warnings in tests
1 parent bf7708f commit 5d58a6a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_pwm.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,8 @@ UTEST(PWMTest, verifyGetFlags) {
405405
}
406406

407407
UTEST(PWMTest, verifyPasswordUpdate) {
408+
#pragma clang diagnostic push
409+
#pragma clang diagnostic ignored "-Wwritable-strings"
408410
putenv("PWM_READONLY=0");
409411
putenv("PWM_LINGER=0");
410412
putenv("PWM_STORE=" TEST_STORE);
@@ -423,6 +425,7 @@ UTEST(PWMTest, verifyPasswordUpdate) {
423425
"what really happened",
424426
"ok but jeez just hang on a second and let me catch my breath its very "
425427
"hot in here"};
428+
#pragma clang diagnostic pop
426429
auto f = get_flags(std::size(argv), argv.data());
427430
f.key = "test!key123";
428431

@@ -436,12 +439,15 @@ UTEST(PWMTest, verifyPasswordUpdate) {
436439
}
437440

438441
UTEST(PWMTest, verifyChangeMasterPassword) {
442+
#pragma clang diagnostic push
443+
#pragma clang diagnostic ignored "-Wwritable-strings"
439444
putenv("PWM_READONLY=0");
440445
putenv("PWM_LINGER=0");
441446
putenv("PWM_STORE=" TEST_STORE);
442447
remove(TEST_STORE);
443448

444449
std::vector<char *> argv{"pwm", "-u", "foo"};
450+
#pragma clang diagnostic pop
445451
auto f = get_flags(std::size(argv), argv.data());
446452
f.key = "test!key123";
447453

0 commit comments

Comments
 (0)