[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 9ccb4aa: Build: three compiler warnings have b

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 9ccb4aa: Build: three compiler warnings have been addressed
Date: Thu, 23 May 2019 15:10:47 -0400 (EDT)

branch: master
commit 9ccb4aaf2b137597cd4c7bb89f00b9b8a6888216
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Build: three compiler warnings have been addressed
    Raul Infante-Sainz reported that Gnuastro's build on macOS produced two
    warnings in Convolve and one in the libraries. With this commit, they are
    both corrected.
    In the first case, we were not writing the output string into `source' when
    there was a file as input. In the second, we were checking a condition that
    is always true: the address of an allocated space. The third was due to an
    initialization (irrelevant to the program!).
 bin/convolve/convolve.c | 2 +-
 bin/convolve/ui.c       | 2 +-
 lib/options.c           | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/convolve/convolve.c b/bin/convolve/convolve.c
index c374531..4d23262 100644
--- a/bin/convolve/convolve.c
+++ b/bin/convolve/convolve.c
@@ -790,7 +790,7 @@ convolve(struct convolveparams *p)
       /* Clean up: free the actual input and replace it's pointer with the
          convolved dataset to save as output. */
-      if(&cp->tl) gal_tile_full_free_contents(&cp->tl);
+      gal_tile_full_free_contents(&cp->tl);
diff --git a/bin/convolve/ui.c b/bin/convolve/ui.c
index 3698f8d..25c7ad1 100644
--- a/bin/convolve/ui.c
+++ b/bin/convolve/ui.c
@@ -384,7 +384,7 @@ ui_read_column(struct convolveparams *p, int i0k1)
-        gal_checkset_dataset_name(filename, hdu);
+        source=gal_checkset_dataset_name(filename, hdu);
       error(EXIT_FAILURE, 0, "%s: more than one column in input table mached "
diff --git a/lib/options.c b/lib/options.c
index 10ae646..58becc6 100644
--- a/lib/options.c
+++ b/lib/options.c
@@ -516,7 +516,7 @@ void *
 gal_options_read_interpmetric(struct argp_option *option, char *arg,
                               char *filename, size_t lineno, void *junk)
-  char *str;
+  char *str=NULL;
       switch(*(uint8_t *)(option->value))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]