gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] (no subject)


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] (no subject)
Date: Fri, 3 Jun 2016 11:24:40 +0000 (UTC)

branch: master
commit 49193a8aa346a7cdb69372b82e25b2a128885e1d
Author: Mohammad Akhlaghi <address@hidden>
Date:   Fri Jun 3 15:47:33 2016 +0900

    Variable initialization reading FITS keywords
    
    While testing compilation in Ubuntu (on a virtual machine), I noticed that
    there was an uninitialized value warning for `valueptr' in the
    `gal_fitsarray_read_keywords', so it was initialized to `NULL'. This would
    not have been an issue since the `case' structure would go to `default' if
    it wasn't set. But this will make it clear for the compiler, since
    `valueptr' is not explictly checked.
---
 lib/fitsarrayvv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fitsarrayvv.c b/lib/fitsarrayvv.c
index 57957a6..0e31f2c 100644
--- a/lib/fitsarrayvv.c
+++ b/lib/fitsarrayvv.c
@@ -779,8 +779,8 @@ gal_fitsarray_read_keywords(char *filename, char *hdu,
   int status=0;
   char *ffname;
   size_t i, len;
-  void *valueptr;
   fitsfile *fptr;
+  void *valueptr=NULL;
 
   /* Add hdu to filename: */
   errno=0;



reply via email to

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