summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastian Koppelmann <kbastian@mail.uni-paderborn.de>2022-08-30 11:46:08 +0200
committerBastian Koppelmann <kbastian@mail.uni-paderborn.de>2022-08-30 13:15:41 +0200
commitc57bc8d8c3026ca069c3e7e54e0f29469d0312af (patch)
treede2bd08e180b7c4909ed34049434a47e122c45de
parent0338c1f696e01cd89c26ea7854cfc110c283f069 (diff)
downloadnavit-c57bc8d8c3026ca069c3e7e54e0f29469d0312af.tar.gz
fix:navit: Fix -Waddress warning
since 'lastline[]' is stack-allocated it can never be NULL, thus we don't need to check for that. This fixes the following compiler warning: warning: the comparison will always evaluate as ‘true’ for the address of ‘lastline’ will never be NULL [-Waddress] 1809 | if ((lastline != NULL) && (strcmp(lastline, TEXTFILE_COMMENT_NAVI_STOPPED))) {
-rw-r--r--navit/navit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/navit/navit.c b/navit/navit.c
index d3ef113f5..f01c9efcd 100644
--- a/navit/navit.c
+++ b/navit/navit.c
@@ -1806,7 +1806,7 @@ static int navit_former_destinations_active(struct navit *this_) {
if (destination_file) {
while(fgets(lastline, sizeof(lastline), destination_file));
fclose(destination_file);
- if ((lastline != NULL) && (strcmp(lastline, TEXTFILE_COMMENT_NAVI_STOPPED))) {
+ if (strcmp(lastline, TEXTFILE_COMMENT_NAVI_STOPPED)) {
active=1;
}
}