kosma / minmea

a lightweight GPS NMEA 0183 parser library in pure C
Do What The F*ck You Want To Public License
735 stars 246 forks source link

tests.c - Fix 'format-security' warnings due to use of ck_assert_msg(… #60

Closed cmorganBE closed 2 years ago

cmorganBE commented 2 years ago

…) without a formatting string

https://fedoraproject.org/wiki/Format-Security-FAQ#What_is_-Wformat-security

tests.c: In function ‘test_minmea_check_fn’: tests.c:79:9: error: format not a string literal and no format arguments [-Werror=format-security] 79 | ck_assert_msg(minmea_check(sentence, false) == true, sentence); | ^~~~~ tests.c:80:9: error: format not a string literal and no format arguments [-Werror=format-security] 80 | ck_assert_msg(minmea_check(sentence, true) == false, sentence); | ^~~~~ tests.c:84:9: error: format not a string literal and no format arguments [-Werror=format-security] 84 | ck_assert_msg(minmea_check(sentence, false) == true, sentence); | ^~~~~ tests.c:85:9: error: format not a string literal and no format arguments [-Werror=format-security] 85 | ck_assert_msg(minmea_check(sentence, true) == true, sentence); | ^~~~~ tests.c:89:9: error: format not a string literal and no format arguments [-Werror=format-security] 89 | ck_assert_msg(minmea_check(sentence, false) == false, sentence); | ^~~~~ tests.c:90:9: error: format not a string literal and no format arguments [-Werror=format-security] 90 | ck_assert_msg(minmea_check(sentence, true) == false, sentence); | ^~~~~