changeset 2616:57971237b59b

Oops, 'first warning variable was set to false by default. And the check was wrong anyway. Fixed.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 16 Feb 2024 20:08:36 +0200
parents 5a6211b3ee55
children 3ccd5facc238
files src/mkloc.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/mkloc.c	Fri Feb 16 18:13:37 2024 +0200
+++ b/src/mkloc.c	Fri Feb 16 20:08:36 2024 +0200
@@ -675,7 +675,7 @@
 void printLocWarning(bool *first, FILE *fh, const LocMarker *loc, const char *msg)
 {
     FILE *outFH = optWarningsToLoc ? fh : stderr;
-    if (first)
+    if (*first)
     {
         // Get continent name
         char *csep, *continent = loc->file != NULL ?
@@ -722,7 +722,7 @@
         // Add comment in few cases
         if (optWarnings)
         {
-            bool first = false;
+            bool first = true;
             if ((optWarnings & WARN_MARKER_INVALID) &&
                 (loc->flags & LOCF_INVALID))
                 printLocWarning(&first, outFile, loc, "Possibly invalid location marker");