gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 88935ae 073/113: Dataset pointers initialized


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 88935ae 073/113: Dataset pointers initialized to NULL in upperlimit_write_check
Date: Fri, 16 Apr 2021 10:33:50 -0400 (EDT)

branch: master
commit 88935aea765f700f0eb837d3d9b5fe4d24cef706
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Dataset pointers initialized to NULL in upperlimit_write_check
    
    To avoid some compiler warnings (only for `z'), the pointers for the `x',
    `y', `z' and `s' array were set to `NULL'. The rest were set to `NULL' also
    to be clean and symmetric (same action for all), thus avoid confusion.
---
 bin/mkcatalog/upperlimit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/mkcatalog/upperlimit.c b/bin/mkcatalog/upperlimit.c
index eb29a04..2b271be 100644
--- a/bin/mkcatalog/upperlimit.c
+++ b/bin/mkcatalog/upperlimit.c
@@ -367,10 +367,10 @@ upperlimit_write_check(struct mkcatalogparams *p, 
gal_list_sizet_t *check_x,
                        gal_list_f32_t *check_s)
 {
   float *sarr;
-  gal_data_t *x, *y, *z, *s;
   char *tmp=NULL, *tmp2=NULL;
   gal_list_str_t *comments=NULL;
   size_t *xarr, *yarr, *zarr=NULL, tnum, ttnum, num;
+  gal_data_t *x=NULL, *y=NULL, *z=NULL, *s=NULL; /* To avoid warnings. */
 
 
   /* Convert the lists to an array. */



reply via email to

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