[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 0487ba5 14/14: Initializing delta and dist arr
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 0487ba5 14/14: Initializing delta and dist arrays in match library |
Date: |
Sun, 17 Dec 2017 11:31:20 -0500 (EST) |
branch: master
commit 0487ba554e5998e8ff3a653234650d6e5e0b824a
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Initializing delta and dist arrays in match library
Alan Lefor reported that his compiler would give an "uninitialized" warning
for the `delta' array in the matching library. Therefore the values of this
array (and `dist') are initialized to NaN.
---
lib/match.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/match.c b/lib/match.c
index 22401f1..92003ac 100644
--- a/lib/match.c
+++ b/lib/match.c
@@ -355,11 +355,11 @@ match_coordinates_second_in_first(gal_data_t *A,
gal_data_t *B,
redundant variables (those that equal a previous value) are only
defined to make it easy to read the code.*/
int iscircle=0;
- double delta[2];
- double r, c=NAN, s=NAN, dist[2];
+ double r, c=NAN, s=NAN;
size_t i, ar=A->size, br=B->size;
size_t ai, bi, blow=0, prevblow=0;
size_t ndim=gal_list_data_number(A);
+ double dist[2]={NAN,NAN}, delta[2]={NAN,NAN};
double *a[2]={A->array, A->next ? A->next->array : NULL};
double *b[2]={B->array, B->next ? B->next->array : NULL};
- [gnuastro-commits] master updated (589ca52 -> 0487ba5), Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master c46e36d 03/14: Minor corrections in webpage script, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 0bbdf6d 05/14: Minor corrections to optional dependencies, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 74dd74f 08/14: Match program's man page is built, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master c6a96b2 07/14: In citation, primarily was changed to initially, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 0487ba5 14/14: Initializing delta and dist arrays in match library,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 2631def 10/14: Minor edits in book's configuration options and intro, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master d7a7c37 12/14: Minor edits in book, acknowledgements updated, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master c448b38 04/14: Better explanation on GNU Libtool in book, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master f0a4d1e 01/14: In configure, current directory removed from PATH, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 104b657 06/14: Configuration warning if PATH includes current directory, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 481b53a 13/14: -Qunused-arguments now dealt with in CXXFLAGS, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master 182f397 11/14: No -pthread flag in LDFLAGS, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master e9842b5 02/14: Webpage translations now fully incorporated, Mohammad Akhlaghi, 2017/12/17
- [gnuastro-commits] master eef4e80 09/14: Arithmetic's binary operators don't need compiled types, Mohammad Akhlaghi, 2017/12/17