gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master c1e66ab: Table: initialized array pointers to


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master c1e66ab: Table: initialized array pointers to avoid compiler warning
Date: Wed, 20 Jan 2021 19:52:24 -0500 (EST)

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

    Table: initialized array pointers to avoid compiler warning
    
    In a recent build of Gnuastro, I noticed a compiler warning due to the 'x'
    and 'y' operators of the 'arithmetic_trig_hyper' function.
    
    With this commit, they are initialized to zero to avoid this warning.
---
 bin/table/arithmetic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/table/arithmetic.c b/bin/table/arithmetic.c
index 4bc11e6..7ed41c6 100644
--- a/bin/table/arithmetic.c
+++ b/bin/table/arithmetic.c
@@ -593,7 +593,7 @@ arithmetic_trig_hyper(struct tableparams *p, gal_data_t 
**stack,
                       int operator)
 {
   size_t i;
-  double *x, *y;
+  double *x=NULL, *y=NULL;
   gal_data_t *in=NULL, *in2=NULL;
   double pi=3.14159265358979323846264338327;
 



reply via email to

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