You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-libs/stellarsolver/files/stellarsolver-2.5-compiler-...

27 lines
1.0 KiB

From 475193d28c0b33b14cecf9492a7c3cd06abcc9f5 Mon Sep 17 00:00:00 2001
From: Tim Surber <me@timsurber.de>
Date: Wed, 10 Apr 2024 23:36:49 +0200
Subject: [PATCH] fix another compiler warning
---
stellarsolver/astrometry/util/fitstable.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/stellarsolver/astrometry/util/fitstable.c b/stellarsolver/astrometry/util/fitstable.c
index 10e1bc2..5885040 100644
--- a/stellarsolver/astrometry/util/fitstable.c
+++ b/stellarsolver/astrometry/util/fitstable.c
@@ -1227,7 +1227,11 @@ static fitstable_t* open_for_writing(const char* fn, const char* mode, FILE* fid
else {
tab->fid = fopen(fn, mode);
if (!tab->fid) {
- SYSERROR("Couldn't open output file %s for writing", fn);
+ if (fn != NULL) {
+ SYSERROR("Couldn't open output file %s for writing", fn);
+ } else {
+ SYSERROR("Couldn't open output file because the filename is null");
+ }
goto bailout;
}
}