1 |
bicatali 07/09/11 11:21:26 |
2 |
|
3 |
Added: wcstools-3.7.0-fix-warnings.patch |
4 |
wcstools-3.7.0-autotools.patch |
5 |
digest-wcstools-3.7.0 |
6 |
wcstools-3.7.0-fix-leaks.patch |
7 |
Removed: wcstools-3.6.7-codewarn.patch |
8 |
Log: |
9 |
Version bump. Adapted patches and fixed leaks. Closing bug #191884 |
10 |
(Portage version: 2.1.2.12) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 sci-astronomy/wcstools/files/wcstools-3.7.0-fix-warnings.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-warnings.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-warnings.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: wcstools-3.7.0-fix-warnings.patch |
19 |
=================================================================== |
20 |
diff -Nur ../wcstools-3.7.0.orig/bincat.c ./bincat.c |
21 |
--- ../wcstools-3.7.0.orig/bincat.c 2007-09-11 11:16:02.875152620 +0100 |
22 |
+++ ./bincat.c 2007-09-11 11:16:23.654508873 +0100 |
23 |
@@ -90,7 +90,7 @@ |
24 |
char *lastchar; |
25 |
char filename[128]; |
26 |
FILE *flist; |
27 |
- char *listfile; |
28 |
+ char *listfile = NULL; |
29 |
char rastr[32], decstr[32]; |
30 |
double x, y; |
31 |
char cs1; |
32 |
diff -Nur ../wcstools-3.7.0.orig/cphead.c ./cphead.c |
33 |
--- ../wcstools-3.7.0.orig/cphead.c 2007-09-11 11:16:02.899153988 +0100 |
34 |
+++ ./cphead.c 2007-09-11 11:16:23.670501784 +0100 |
35 |
@@ -357,7 +357,7 @@ |
36 |
double dval; |
37 |
int ival, nch; |
38 |
int iraffile; |
39 |
- int ndec, nbheadout, nbheadin, nbheader; |
40 |
+ int ndec, nbheadout = 0, nbheadin, nbheader; |
41 |
char newname[128]; |
42 |
char string[80]; |
43 |
char *kw, *kwe, *filepath, *fname, *ext, *imext, *imext1; |
44 |
diff -Nur ../wcstools-3.7.0.orig/crlf.c ./crlf.c |
45 |
--- ../wcstools-3.7.0.orig/crlf.c 2007-09-11 11:16:02.899153988 +0100 |
46 |
+++ ./crlf.c 2007-09-11 11:16:23.686494696 +0100 |
47 |
@@ -99,7 +99,7 @@ |
48 |
if (buffer[i] == (char) 13) |
49 |
buffer[i] = (char) 10; |
50 |
} |
51 |
- (void) write (1, buffer, nbr); |
52 |
+ write (1, buffer, nbr); |
53 |
} |
54 |
} |
55 |
return; |
56 |
diff -Nur ../wcstools-3.7.0.orig/delhead.c ./delhead.c |
57 |
--- ../wcstools-3.7.0.orig/delhead.c 2007-09-11 11:16:02.899153988 +0100 |
58 |
+++ ./delhead.c 2007-09-11 11:16:23.702487608 +0100 |
59 |
@@ -551,7 +551,7 @@ |
60 |
char *header; /* FITS header */ |
61 |
int verbose; /* If true, print deletion confirmations */ |
62 |
{ |
63 |
- char *hplace, *hcom, *v, *v1, *v2, *ve; |
64 |
+ char *hplace, *hcom, *v, *v2, *ve; |
65 |
int i, killcom, nline; |
66 |
int nkill = 0; |
67 |
|
68 |
@@ -585,7 +585,7 @@ |
69 |
|
70 |
/* Fill line with blanks */ |
71 |
else { |
72 |
- for (i = 0; i++; i < 80) |
73 |
+ for (i = 0; i < 80; i++) |
74 |
hcom[i] = ' '; |
75 |
hplace = hplace + 80; |
76 |
} |
77 |
diff -Nur ../wcstools-3.7.0.orig/delwcs.c ./delwcs.c |
78 |
--- ../wcstools-3.7.0.orig/delwcs.c 2007-09-11 11:16:02.899153988 +0100 |
79 |
+++ ./delwcs.c 2007-09-11 11:16:23.722478748 +0100 |
80 |
@@ -114,7 +114,7 @@ |
81 |
|
82 |
{ |
83 |
char *header; /* FITS image header */ |
84 |
- char *image; /* Image pixels */ |
85 |
+ char *image = NULL; /* Image pixels */ |
86 |
int lhead; /* Maximum number of bytes in FITS header */ |
87 |
int nbhead; /* Actual number of bytes in FITS header */ |
88 |
int iraffile; /* 1 if IRAF image */ |
89 |
diff -Nur ../wcstools-3.7.0.orig/edhead.c ./edhead.c |
90 |
--- ../wcstools-3.7.0.orig/edhead.c 2007-09-11 11:16:02.899153988 +0100 |
91 |
+++ ./edhead.c 2007-09-11 11:16:23.762461027 +0100 |
92 |
@@ -210,8 +210,8 @@ |
93 |
break; |
94 |
} |
95 |
nbytes = i + 1; |
96 |
- (void) fwrite (headline, 1, nbytes, fd); |
97 |
- (void) fwrite (newline, 1, 1, fd); |
98 |
+ fwrite (headline, 1, nbytes, fd); |
99 |
+ fwrite (newline, 1, 1, fd); |
100 |
} |
101 |
fclose (fd); |
102 |
free (header); |
103 |
diff -Nur ../wcstools-3.7.0.orig/filename.c ./filename.c |
104 |
--- ../wcstools-3.7.0.orig/filename.c 2007-09-11 11:16:02.899153988 +0100 |
105 |
+++ ./filename.c 2007-09-11 11:16:23.786450395 +0100 |
106 |
@@ -39,7 +39,7 @@ |
107 |
{ |
108 |
char *fn, *fn0; |
109 |
char *str; |
110 |
- char *name; |
111 |
+ char *name = NULL; |
112 |
char *is[10]; |
113 |
char *endroot; |
114 |
int i, n; |
115 |
diff -Nur ../wcstools-3.7.0.orig/getcol.c ./getcol.c |
116 |
--- ../wcstools-3.7.0.orig/getcol.c 2007-09-11 11:16:02.923155356 +0100 |
117 |
+++ ./getcol.c 2007-09-11 11:16:23.810439763 +0100 |
118 |
@@ -447,7 +447,7 @@ |
119 |
nop++; |
120 |
} |
121 |
else |
122 |
- printf (" Constants %s, %s, or operation %s illegal\n",sop1,sop2,opi[0]); |
123 |
+ printf (" Constants %s, %s, or operation %c illegal\n",sop1,sop2,opi[0]); |
124 |
} |
125 |
|
126 |
/* File to read */ |
127 |
diff -Nur ../wcstools-3.7.0.orig/getdate.c ./getdate.c |
128 |
--- ../wcstools-3.7.0.orig/getdate.c 2007-09-11 11:16:02.923155356 +0100 |
129 |
+++ ./getdate.c 2007-09-11 11:16:23.830430903 +0100 |
130 |
@@ -409,10 +409,10 @@ |
131 |
int year, vyear; |
132 |
int lfd, oldfits; |
133 |
char outform[16]; |
134 |
- char *fitsdate, *newfdate, *stdate; |
135 |
+ char *fitsdate = NULL, *newfdate, *stdate; |
136 |
char temp[64]; |
137 |
char fyear[16]; |
138 |
- char ts0[8]; |
139 |
+ char ts0[9]; |
140 |
char *tchar; |
141 |
int its, its1; |
142 |
time_t lts; |
143 |
diff -Nur ../wcstools-3.7.0.orig/getpix.c ./getpix.c |
144 |
--- ../wcstools-3.7.0.orig/getpix.c 2007-09-11 11:16:02.923155356 +0100 |
145 |
+++ ./getpix.c 2007-09-11 11:16:23.846423815 +0100 |
146 |
@@ -68,7 +68,7 @@ |
147 |
char *fn; |
148 |
char *rrange; /* Row range string */ |
149 |
char *crange; /* Column range string */ |
150 |
- char *rstr; |
151 |
+ char *rstr = NULL; |
152 |
char *dstr = NULL; |
153 |
char *cstr; |
154 |
int systemp; |
155 |
diff -Nur ../wcstools-3.7.0.orig/gettab.c ./gettab.c |
156 |
--- ../wcstools-3.7.0.orig/gettab.c 2007-09-11 11:16:02.923155356 +0100 |
157 |
+++ ./gettab.c 2007-09-11 11:16:23.862416727 +0100 |
158 |
@@ -558,7 +558,7 @@ |
159 |
char *alias[]; /* Output names of keywords if different from input */ |
160 |
|
161 |
{ |
162 |
- char *str; |
163 |
+ char *str = NULL; |
164 |
char *cstr, *cval, cvalue[64]; |
165 |
int pass = 0; |
166 |
int drop; |
167 |
diff -Nur ../wcstools-3.7.0.orig/imcat.c ./imcat.c |
168 |
--- ../wcstools-3.7.0.orig/imcat.c 2007-09-11 11:16:02.975158319 +0100 |
169 |
+++ ./imcat.c 2007-09-11 11:16:23.886406094 +0100 |
170 |
@@ -109,9 +109,6 @@ |
171 |
char **fn; |
172 |
int i, ic; |
173 |
int nx, ny; |
174 |
- char *header; |
175 |
- double cra, cdec, dra, ddec, secpix; |
176 |
- int wp, hp, bitpix; |
177 |
double x, y; |
178 |
char *refcatname[5]; /* reference catalog name */ |
179 |
int ncat = 0; |
180 |
@@ -123,7 +120,7 @@ |
181 |
int scat = 0; |
182 |
char c1, c, *ccom; |
183 |
double drot; |
184 |
- struct WorldCoor *wcs = NULL; /* World coordinate system structure */ |
185 |
+ /*struct WorldCoor *wcs = NULL;*/ /* World coordinate system structure */ |
186 |
|
187 |
nfile = 0; |
188 |
fn = (char **)calloc (maxnfile, sizeof(char *)); |
189 |
@@ -1777,7 +1774,7 @@ |
190 |
sprintf (headline, "%s %s %s %5.1f %5.1f %d", |
191 |
numstr,rastr,decstr,gm[0][i],gm[1][i],gc[i]); |
192 |
else if (refcat == SKYBOT) |
193 |
- sprintf (headline, "%s %s %s %5.2f %5.2f %5.2f", |
194 |
+ sprintf (headline, "%s %s %s %5.2f %5.2f %5.2f %5.2f", |
195 |
numstr,rastr,decstr,gm[0][i],gm[1][i],gm[2][i],gm[3][i]); |
196 |
else if (refcat == UJC) |
197 |
sprintf (headline, "%s %s %s %5.2f %d", |
198 |
diff -Nur ../wcstools-3.7.0.orig/imfill.c ./imfill.c |
199 |
--- ../wcstools-3.7.0.orig/imfill.c 2007-09-11 11:16:02.975158319 +0100 |
200 |
+++ ./imfill.c 2007-09-11 11:16:23.914393690 +0100 |
201 |
@@ -313,7 +313,7 @@ |
202 |
int nfilled; |
203 |
int nbadpix; |
204 |
int i; |
205 |
- char *irafheader; /* IRAF image header */ |
206 |
+ char *irafheader = NULL; /* IRAF image header */ |
207 |
char newname[256]; /* Name for revised image */ |
208 |
char *ltime; |
209 |
char *endchar; |
210 |
diff -Nur ../wcstools-3.7.0.orig/imsmooth.c ./imsmooth.c |
211 |
--- ../wcstools-3.7.0.orig/imsmooth.c 2007-09-11 11:16:02.999159687 +0100 |
212 |
+++ ./imsmooth.c 2007-09-11 11:16:23.946379514 +0100 |
213 |
@@ -263,7 +263,7 @@ |
214 |
char *ext = NULL; |
215 |
char *newimage = NULL; |
216 |
char *imext = NULL; |
217 |
- char *imext1; |
218 |
+ char *imext1 = NULL; |
219 |
char *fname; |
220 |
char extname[16]; |
221 |
int lext = 0; |
222 |
diff -Nur ../wcstools-3.7.0.orig/imstack.c ./imstack.c |
223 |
--- ../wcstools-3.7.0.orig/imstack.c 2007-09-11 11:16:02.999159687 +0100 |
224 |
+++ ./imstack.c 2007-09-11 11:16:23.946379514 +0100 |
225 |
@@ -194,7 +194,7 @@ |
226 |
blanks = (char *) malloc ((size_t) nbytes); |
227 |
for (i = 0; i < nbytes; i++) |
228 |
blanks[i] = 0; |
229 |
- (void) fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack); |
230 |
+ fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack); |
231 |
free (blanks); |
232 |
} |
233 |
} |
234 |
@@ -449,7 +449,7 @@ |
235 |
blanks = (char *) malloc ((size_t) nbytes); |
236 |
for (i = 0; i < nbytes; i++) |
237 |
blanks[i] = 0; |
238 |
- (void) fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack); |
239 |
+ fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack); |
240 |
free (blanks); |
241 |
} |
242 |
} |
243 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/binread.c ./libwcs/binread.c |
244 |
--- ../wcstools-3.7.0.orig/libwcs/binread.c 2007-09-11 11:16:02.771146693 +0100 |
245 |
+++ ./libwcs/binread.c 2007-09-11 11:16:23.970368881 +0100 |
246 |
@@ -505,7 +505,7 @@ |
247 |
struct Star *star; |
248 |
char str[128]; |
249 |
int nmag; |
250 |
- int mrv; |
251 |
+ int mrv = 0; |
252 |
|
253 |
nstar = 0; |
254 |
starcat = binopen (bincat); |
255 |
@@ -694,7 +694,7 @@ |
256 |
int nmag; /* Real number of magnitudes per entry (- rv) */ |
257 |
int jstar; |
258 |
int nstar; |
259 |
- double mag; |
260 |
+ double mag = 0; |
261 |
double num; |
262 |
int magsort; |
263 |
int istar = 0; |
264 |
@@ -1372,7 +1372,7 @@ |
265 |
for (i = 0; i < nmag; i++) { |
266 |
moveb (sc->catline, (char *) st->mag, 2, sc->entmag[0]+(i*2), i*2); |
267 |
if (sc->byteswapped) |
268 |
- binswap2 (&st->mag[i], 2); |
269 |
+ binswap2 ((char*)&st->mag[i], 2); |
270 |
st->xmag[i] = 0.01 * (double) st->mag[i]; |
271 |
} |
272 |
} |
273 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/catutil.c ./libwcs/catutil.c |
274 |
--- ../wcstools-3.7.0.orig/libwcs/catutil.c 2007-09-11 11:16:02.771146693 +0100 |
275 |
+++ ./libwcs/catutil.c 2007-09-11 11:16:23.994358249 +0100 |
276 |
@@ -737,7 +737,7 @@ |
277 |
lname = 0; |
278 |
else |
279 |
lname = strlen (refcatname); |
280 |
- catname = (char *)calloc (lname + 16, 1); |
281 |
+ catname = (char *)calloc (lname + 37, 1); |
282 |
if (lname > 0) |
283 |
sprintf (catname, "%s sources", refcatname); |
284 |
else |
285 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/fileutil.c ./libwcs/fileutil.c |
286 |
--- ../wcstools-3.7.0.orig/libwcs/fileutil.c 2007-09-11 11:16:02.771146693 +0100 |
287 |
+++ ./libwcs/fileutil.c 2007-09-11 11:16:24.010351161 +0100 |
288 |
@@ -343,7 +343,7 @@ |
289 |
/* If line can be read, add null at the end of the first token */ |
290 |
if (fgets (token, ncmax, diskfile) != NULL) { |
291 |
if (token[0] == '#') { |
292 |
- (void) fgets (token, ncmax, diskfile); |
293 |
+ fgets (token, ncmax, diskfile); |
294 |
} |
295 |
|
296 |
/* If only character is a control character, return a NULL */ |
297 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/findstar.c ./libwcs/findstar.c |
298 |
--- ../wcstools-3.7.0.orig/libwcs/findstar.c 2007-09-11 11:16:02.771146693 +0100 |
299 |
+++ ./libwcs/findstar.c 2007-09-11 11:16:24.038338757 +0100 |
300 |
@@ -747,7 +747,7 @@ |
301 |
double sd = 0.0; |
302 |
int i; |
303 |
int npix; |
304 |
- double dnpix; |
305 |
+ double dnpix = 0; |
306 |
double sum; |
307 |
|
308 |
pmin = -1.0e20; |
309 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/fitsfile.c ./libwcs/fitsfile.c |
310 |
--- ../wcstools-3.7.0.orig/libwcs/fitsfile.c 2007-09-11 11:16:02.775146921 +0100 |
311 |
+++ ./libwcs/fitsfile.c 2007-09-11 11:16:24.062328125 +0100 |
312 |
@@ -874,7 +874,7 @@ |
313 |
if (!simple) { |
314 |
nbytes = getfilesize (filename) - nbhead; |
315 |
if ((image = (char *) malloc (nbytes + 1)) == NULL) { |
316 |
- snprintf (fitserrmsg,79, "FITSRFULL: %d-byte image buffer cannot be allocated\n"); |
317 |
+ snprintf (fitserrmsg,79, "FITSRFULL: %d-byte image buffer cannot be allocated\n", nbytes); |
318 |
(void)close (fd); |
319 |
return (NULL); |
320 |
} |
321 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/gsc2read.c ./libwcs/gsc2read.c |
322 |
--- ../wcstools-3.7.0.orig/libwcs/gsc2read.c 2007-09-11 11:16:02.775146921 +0100 |
323 |
+++ ./libwcs/gsc2read.c 2007-09-11 11:16:24.086317492 +0100 |
324 |
@@ -191,7 +191,7 @@ |
325 |
|
326 |
/* Dump returned file and stop */ |
327 |
if (nlog < 0) { |
328 |
- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); |
329 |
+ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); |
330 |
exit (0); |
331 |
} |
332 |
|
333 |
@@ -293,7 +293,7 @@ |
334 |
char *databuff; |
335 |
char *lastbuff; |
336 |
char *oldbuff; |
337 |
- char *colhead, *colsep; |
338 |
+ /*char *colhead, *colsep;*/ |
339 |
int lhead, lbuff, i, j; |
340 |
char ctab = (char) 9; |
341 |
char ccom = ','; |
342 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/gscread.c ./libwcs/gscread.c |
343 |
--- ../wcstools-3.7.0.orig/libwcs/gscread.c 2007-09-11 11:16:02.775146921 +0100 |
344 |
+++ ./libwcs/gscread.c 2007-09-11 11:16:24.114305088 +0100 |
345 |
@@ -512,7 +512,7 @@ |
346 |
} |
347 |
|
348 |
/* Close region input file */ |
349 |
- (void) close (ift); |
350 |
+ close (ift); |
351 |
itot = itot + itable; |
352 |
if (nlog > 0) |
353 |
fprintf (stderr,"GSCREAD: %4d / %4d: %5d / %5d / %5d sources from region %4d \n", |
354 |
@@ -549,7 +549,7 @@ |
355 |
int *gtype; /* Array of object types (returned) */ |
356 |
int nlog; /* 1 for diagnostics */ |
357 |
{ |
358 |
- char *table; /* FITS table */ |
359 |
+ char *table = NULL; /* FITS table */ |
360 |
char inpath[64]; /* Pathname for input FITS table file */ |
361 |
char entry[100]; /* Buffer for FITS table row */ |
362 |
int class; /* Object class (0>star, 3>other) */ |
363 |
@@ -574,7 +574,7 @@ |
364 |
double perr0 = 0.0; |
365 |
double ra0 = 0.0; |
366 |
double dec0 = 0.0; |
367 |
- char *str; |
368 |
+ char *str = NULL; |
369 |
char *url; |
370 |
|
371 |
itot = 0; |
372 |
@@ -756,7 +756,7 @@ |
373 |
} |
374 |
|
375 |
/* Close region input file */ |
376 |
- (void) close (ift); |
377 |
+ close (ift); |
378 |
itot = itot + itable; |
379 |
if (nlog > 0) |
380 |
fprintf (stderr,"GSCRNUM: %4d / %4d: %5d / %5d sources, region %4d.%04d\n", |
381 |
@@ -795,7 +795,7 @@ |
382 |
int rlist[100]; /* List of input FITS tables files */ |
383 |
char inpath[64]; /* Pathname for input FITS table file */ |
384 |
char entry[100]; /* Buffer for FITS table row */ |
385 |
- int class, class0; /* Object class (0>star, 3>other) */ |
386 |
+ int class = 0, class0 = 0; /* Object class (0>star, 3>other) */ |
387 |
int sysref=WCS_J2000; /* Catalog coordinate system */ |
388 |
double eqref=2000.0; /* Catalog equinox */ |
389 |
struct Keyword kw[8]; /* Keyword structure */ |
390 |
@@ -808,9 +808,9 @@ |
391 |
int ik,nk,itable,ntable,jstar; |
392 |
int nbline,npos,nbhead; |
393 |
int nbr,nrmax,nstar,i; |
394 |
- int ift, band0, band; |
395 |
- double ra,ra0,rasum,dec,dec0,decsum,perr,perr0,perr2,perrsum,msum; |
396 |
- double mag,mag0,merr,merr0,merr2,merrsum; |
397 |
+ int ift, band0 = 0., band = 0.; |
398 |
+ double ra,ra0 = 0.,rasum,dec,dec0 = 0.,decsum,perr,perr0 = 0.,perr2,perrsum,msum; |
399 |
+ double mag,mag0 = 0.,merr,merr0 = 0.,merr2,merrsum; |
400 |
double rra1, rra2, rdec1, rdec2; |
401 |
double rdist, ddist; |
402 |
char *str; |
403 |
@@ -830,11 +830,11 @@ |
404 |
|
405 |
/* Set image parameters */ |
406 |
bitpix = 0; |
407 |
- (void)hgeti4 (header, "BITPIX", &bitpix); |
408 |
+ hgeti4 (header, "BITPIX", &bitpix); |
409 |
w = 0; |
410 |
- (void)hgeti4 (header, "NAXIS1", &w); |
411 |
+ hgeti4 (header, "NAXIS1", &w); |
412 |
h = 0; |
413 |
- (void)hgeti4 (header, "NAXIS2", &h); |
414 |
+ hgeti4 (header, "NAXIS2", &h); |
415 |
|
416 |
if (refcat == GSCACT) { |
417 |
if ((str = getenv("GSCACT_NORTH")) == NULL) |
418 |
@@ -1080,7 +1080,7 @@ |
419 |
} |
420 |
|
421 |
/* Close region input file */ |
422 |
- (void) close (ift); |
423 |
+ close (ift); |
424 |
itot = itot + itable; |
425 |
if (nlog > 0) |
426 |
fprintf (stderr,"GSCBIN: %4d / %4d: %5d / %5d / %5d sources from region %4d \n", |
427 |
@@ -1321,7 +1321,7 @@ |
428 |
jr2 = 0; |
429 |
} |
430 |
|
431 |
- (void) close (ift); |
432 |
+ close (ift); |
433 |
return (nrgn); |
434 |
} |
435 |
|
436 |
@@ -1381,7 +1381,7 @@ |
437 |
double min; /* Minutes of declination */ |
438 |
|
439 |
/* Get declination sign from table */ |
440 |
- (void) ftgetc (fitsline, &rkw[sgncol], sgn, 3); |
441 |
+ ftgetc (fitsline, &rkw[sgncol], sgn, 3); |
442 |
|
443 |
/* Get degrees of declination from table */ |
444 |
deg = ftgetr8 (fitsline, &rkw[dcol]); |
445 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/hput.c ./libwcs/hput.c |
446 |
--- ../wcstools-3.7.0.orig/libwcs/hput.c 2007-09-11 11:16:02.775146921 +0100 |
447 |
+++ ./libwcs/hput.c 2007-09-11 11:16:24.142292684 +0100 |
448 |
@@ -273,7 +273,7 @@ |
449 |
const char *cval; /* character string containing the value for variable |
450 |
keyword. trailing and leading blanks are removed. */ |
451 |
{ |
452 |
- int lroot, lcv, i, ii, nkw, lkw, lval; |
453 |
+ int lroot = 0, lcv, i, ii, nkw, lkw, lval; |
454 |
int comment = 0; |
455 |
const char *v; |
456 |
char keyroot[8], newkey[12], value[80]; |
457 |
@@ -599,7 +599,7 @@ |
458 |
char squot, slash, space; |
459 |
char line[100]; |
460 |
int lkeyword, lcom, lhead, i, lblank, ln, nc, lc; |
461 |
- char *vp, *v1, *v2, *c0, *c1, *q1, *q2; |
462 |
+ char *vp, *v1, *v2, *c0, *c1, *q1, *q2=NULL; |
463 |
|
464 |
squot = (char) 39; |
465 |
slash = (char) 47; |
466 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/imgetwcs.c ./libwcs/imgetwcs.c |
467 |
--- ../wcstools-3.7.0.orig/libwcs/imgetwcs.c 2007-09-11 11:16:02.775146921 +0100 |
468 |
+++ ./libwcs/imgetwcs.c 2007-09-11 11:16:24.158285596 +0100 |
469 |
@@ -381,7 +381,7 @@ |
470 |
double xref, yref, degpix, secpix; |
471 |
struct WorldCoor *wcs; |
472 |
char temp[16]; |
473 |
- char *cwcs; |
474 |
+ char *cwcs = NULL; |
475 |
|
476 |
/* Set the world coordinate system from the image header */ |
477 |
if (strlen (filename) > 0) { |
478 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/imhfile.c ./libwcs/imhfile.c |
479 |
--- ../wcstools-3.7.0.orig/libwcs/imhfile.c 2007-09-11 11:16:02.775146921 +0100 |
480 |
+++ ./libwcs/imhfile.c 2007-09-11 11:16:24.174278507 +0100 |
481 |
@@ -910,10 +910,10 @@ |
482 |
|
483 |
/* Write IRAF header to disk file */ |
484 |
nbw = write (fd, irafheader, nbhead); |
485 |
- (void) ftruncate (fd, nbhead); |
486 |
+ ftruncate (fd, nbhead); |
487 |
close (fd); |
488 |
if (nbw < nbhead) { |
489 |
- (void)fprintf(stderr, "IRAF header file %s: %d / %d bytes written.\n", |
490 |
+ fprintf(stderr, "IRAF header file %s: %d / %d bytes written.\n", |
491 |
hdrname, nbw, nbhead); |
492 |
return (-1); |
493 |
} |
494 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/imrotate.c ./libwcs/imrotate.c |
495 |
--- ../wcstools-3.7.0.orig/libwcs/imrotate.c 2007-09-11 11:16:02.775146921 +0100 |
496 |
+++ ./libwcs/imrotate.c 2007-09-11 11:16:24.190271419 +0100 |
497 |
@@ -371,7 +371,6 @@ |
498 |
|
499 |
{ |
500 |
static char flds[15][8]; |
501 |
- char ctype1[16], ctype2[16]; |
502 |
double ctemp1, ctemp2, ctemp3, ctemp4, naxis1, naxis2; |
503 |
int i, n, ndec1, ndec2, ndec3, ndec4; |
504 |
|
505 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/imsetwcs.c ./libwcs/imsetwcs.c |
506 |
--- ../wcstools-3.7.0.orig/libwcs/imsetwcs.c 2007-09-11 11:16:02.775146921 +0100 |
507 |
+++ ./libwcs/imsetwcs.c 2007-09-11 11:16:24.206264331 +0100 |
508 |
@@ -136,22 +136,22 @@ |
509 |
int nmax; /* Maximum number of matches possible (nrg or nbs) */ |
510 |
int lofld = 0; /* Length of object name field in output */ |
511 |
double mag1,mag2; |
512 |
- int refcat; /* reference catalog switch */ |
513 |
+ int refcat = 0; /* reference catalog switch */ |
514 |
int nmag, mprop; |
515 |
double dxys; |
516 |
char numstr[32]; |
517 |
int minstars; |
518 |
- int ngmax; |
519 |
+ int ngmax = 0; |
520 |
int nbin, nbytes; |
521 |
int iterate, toliterate, nfiterate; |
522 |
- int imag, magsort; |
523 |
+ int imag, magsort = 0; |
524 |
int niter = 0; |
525 |
int recenter = recenter0; |
526 |
int ret = 0; |
527 |
int is, ig, igs, i, j; |
528 |
char rstr[32], dstr[32]; |
529 |
double refeq, refep; |
530 |
- double maxnum; |
531 |
+ double maxnum = 0; |
532 |
int nnfld; |
533 |
int refsys; |
534 |
char refcoor[8]; |
535 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/imutil.c ./libwcs/imutil.c |
536 |
--- ../wcstools-3.7.0.orig/libwcs/imutil.c 2007-09-11 11:16:02.775146921 +0100 |
537 |
+++ ./libwcs/imutil.c 2007-09-11 11:16:24.226255471 +0100 |
538 |
@@ -164,7 +164,7 @@ |
539 |
{ |
540 |
char *buffret; /* Modified image buffer (returned) */ |
541 |
int nx,ny; /* Number of columns and rows in image */ |
542 |
-int ix,iy; /* Pixel around which to compute mean */ |
543 |
+int ix,iy = 0; /* Pixel around which to compute mean */ |
544 |
int npix; /* Number of pixels in image */ |
545 |
int bitpix; /* Number of bits per pixel (<0=floating point) */ |
546 |
int bitpixb; /* Number of bits per pixel in bad pixel file */ |
547 |
@@ -217,7 +217,7 @@ |
548 |
if (*bb++) { |
549 |
*b2++ = bpvali2; |
550 |
nfilled++; |
551 |
- *b1++; |
552 |
+ b1++; |
553 |
} |
554 |
else { |
555 |
*b2++ = *b1++; |
556 |
@@ -236,7 +236,7 @@ |
557 |
if (*bb++) { |
558 |
*b2++ = bpvali2; |
559 |
nfilled++; |
560 |
- *b1++; |
561 |
+ b1++; |
562 |
} |
563 |
else { |
564 |
*b2++ = *b1++; |
565 |
@@ -263,7 +263,7 @@ |
566 |
if (*bb++) { |
567 |
*b2++ = bpvali4; |
568 |
nfilled++; |
569 |
- *b1++; |
570 |
+ b1++; |
571 |
} |
572 |
else { |
573 |
*b2++ = *b1++; |
574 |
@@ -282,7 +282,7 @@ |
575 |
if (*bb++) { |
576 |
*b2++ = bpvali4; |
577 |
nfilled++; |
578 |
- *b1++; |
579 |
+ b1++; |
580 |
} |
581 |
else { |
582 |
*b2++ = *b1++; |
583 |
@@ -310,7 +310,7 @@ |
584 |
if (*bb++) { |
585 |
*b2++ = bpvalr4; |
586 |
nfilled++; |
587 |
- *b1++; |
588 |
+ b1++; |
589 |
} |
590 |
else { |
591 |
*b2++ = *b1++; |
592 |
@@ -329,7 +329,7 @@ |
593 |
if (*bb++) { |
594 |
*b2++ = bpvalr4; |
595 |
nfilled++; |
596 |
- *b1++; |
597 |
+ b1++; |
598 |
} |
599 |
else { |
600 |
*b2++ = *b1++; |
601 |
@@ -355,7 +355,7 @@ |
602 |
if (*bb++) { |
603 |
*b2++ = bpval; |
604 |
nfilled++; |
605 |
- *b1++; |
606 |
+ b1++; |
607 |
} |
608 |
else { |
609 |
*b2++ = *b1++; |
610 |
@@ -374,7 +374,7 @@ |
611 |
if (*bb++) { |
612 |
*b2++ = bpval; |
613 |
nfilled++; |
614 |
- *b1++; |
615 |
+ b1++; |
616 |
} |
617 |
else { |
618 |
*b2++ = *b1++; |
619 |
@@ -407,7 +407,7 @@ |
620 |
{ |
621 |
char *buffret; /* Modified image buffer (returned) */ |
622 |
int nx,ny; /* Number of columns and rows in image */ |
623 |
-int ix,iy; /* Pixel around which to compute mean */ |
624 |
+int ix,iy = 0; /* Pixel around which to compute mean */ |
625 |
int npix; /* Number of pixels in image */ |
626 |
int bitpix; /* Number of bits per pixel (<0=floating point) */ |
627 |
int checkmin = 0; |
628 |
@@ -450,12 +450,12 @@ |
629 |
if (checkmin && *bb < mnvali2) { |
630 |
*b2++ = bpvali2; |
631 |
nfilled++; |
632 |
- *b1++; |
633 |
+ b1++; |
634 |
} |
635 |
else if (checkmax && *bb > mxvali2) { |
636 |
*b2++ = bpvali2; |
637 |
nfilled++; |
638 |
- *b1++; |
639 |
+ b1++; |
640 |
} |
641 |
else { |
642 |
*b2++ = *b1++; |
643 |
@@ -482,12 +482,12 @@ |
644 |
if (checkmin && *bb < mnvali4) { |
645 |
*b2++ = bpvali4; |
646 |
nfilled++; |
647 |
- *b1++; |
648 |
+ b1++; |
649 |
} |
650 |
else if (checkmax && *bb > mxvali4) { |
651 |
*b2++ = bpvali4; |
652 |
nfilled++; |
653 |
- *b1++; |
654 |
+ b1++; |
655 |
} |
656 |
else { |
657 |
*b2++ = *b1++; |
658 |
@@ -514,12 +514,12 @@ |
659 |
if (checkmin && *bb < mnvalr4) { |
660 |
*b2++ = bpvalr4; |
661 |
nfilled++; |
662 |
- *b1++; |
663 |
+ b1++; |
664 |
} |
665 |
else if (checkmax && *bb > mxvalr4) { |
666 |
*b2++ = bpvalr4; |
667 |
nfilled++; |
668 |
- *b1++; |
669 |
+ b1++; |
670 |
} |
671 |
else { |
672 |
*b2++ = *b1++; |
673 |
@@ -546,12 +546,12 @@ |
674 |
if (checkmin && *bb < mnvalr8) { |
675 |
*b2++ = bpvalr8; |
676 |
nfilled++; |
677 |
- *b1++; |
678 |
+ b1++; |
679 |
} |
680 |
else if (checkmax && *bb > mxvalr8) { |
681 |
*b2++ = bpvalr8; |
682 |
nfilled++; |
683 |
- *b1++; |
684 |
+ b1++; |
685 |
} |
686 |
else { |
687 |
*b2++ = *b1++; |
688 |
@@ -589,7 +589,7 @@ |
689 |
{ |
690 |
char *buffret; /* Modified image buffer (returned) */ |
691 |
int nx,ny; /* Number of columns and rows in image */ |
692 |
-int ix,iy; /* Pixel around which to compute median */ |
693 |
+int ix,iy = 0; /* Pixel around which to compute median */ |
694 |
int npix; /* Number of pixels in image */ |
695 |
int bitpix; /* Number of bits per pixel (<0=floating point) */ |
696 |
int naxes; |
697 |
@@ -698,7 +698,7 @@ |
698 |
{ |
699 |
char *buffret; /* Modified image buffer (returned) */ |
700 |
int nx,ny; /* Number of columns and rows in image */ |
701 |
-int ix,iy; /* Pixel around which to compute median */ |
702 |
+int ix,iy = 0; /* Pixel around which to compute median */ |
703 |
int npix; /* Number of pixels in image */ |
704 |
int bitpix; /* Number of bits per pixel (<0=floating point) */ |
705 |
int naxes; |
706 |
@@ -1173,7 +1173,7 @@ |
707 |
{ |
708 |
char *buffret; /* Modified image buffer (returned) */ |
709 |
int nx,ny; /* Number of columns and rows in image */ |
710 |
-int ix,iy; /* Pixel around which to compute mean */ |
711 |
+int ix,iy = 0; /* Pixel around which to compute mean */ |
712 |
int npix; /* Number of pixels in image */ |
713 |
int bitpix; /* Number of bits per pixel (<0=floating point) */ |
714 |
int naxes; |
715 |
@@ -1278,7 +1278,7 @@ |
716 |
{ |
717 |
char *buffret; /* Modified image buffer (returned) */ |
718 |
int nx,ny; /* Number of columns and rows in image */ |
719 |
-int ix,iy; /* Pixel around which to compute mean */ |
720 |
+int ix,iy = 0; /* Pixel around which to compute mean */ |
721 |
int npix; /* Number of pixels in image */ |
722 |
int bitpix; /* Number of bits per pixel (<0=floating point) */ |
723 |
int naxes; |
724 |
@@ -1651,7 +1651,7 @@ |
725 |
{ |
726 |
char *buffret; /* Modified image buffer (returned) */ |
727 |
int nx,ny; /* Number of columns and rows in image */ |
728 |
- int ix,iy; /* Pixel around which to compute median */ |
729 |
+ int ix,iy = 0; /* Pixel around which to compute median */ |
730 |
int npix; /* Number of pixels in image */ |
731 |
int bitpix; /* Number of bits per pixel (<0=floating point) */ |
732 |
int naxes; |
733 |
@@ -1752,7 +1752,7 @@ |
734 |
{ |
735 |
char *buffret; /* Modified image buffer (returned) */ |
736 |
int nx,ny; /* Number of columns and rows in image */ |
737 |
-int ix,iy; /* Pixel around which to compute median */ |
738 |
+int ix,iy = 0; /* Pixel around which to compute median */ |
739 |
int npix; /* Number of pixels in image */ |
740 |
int bitpix; /* Number of bits per pixel (<0=floating point) */ |
741 |
int naxes; |
742 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/proj.c ./libwcs/proj.c |
743 |
--- ../wcstools-3.7.0.orig/libwcs/proj.c 2007-09-11 11:16:02.775146921 +0100 |
744 |
+++ ./libwcs/proj.c 2007-09-11 11:16:24.242248383 +0100 |
745 |
@@ -3672,7 +3672,7 @@ |
746 |
|
747 |
{ |
748 |
int face; |
749 |
- double cthe, eta, l, m, n, rho, xi; |
750 |
+ double cthe, eta = 0, l, m, n, rho, xi = 0; |
751 |
const float tol = 1.0e-7; |
752 |
|
753 |
float a, a2, a2b2, a4, ab, b, b2, b4, ca2, cb2; |
754 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/sdssread.c ./libwcs/sdssread.c |
755 |
--- ../wcstools-3.7.0.orig/libwcs/sdssread.c 2007-09-11 11:16:02.775146921 +0100 |
756 |
+++ ./libwcs/sdssread.c 2007-09-11 11:16:24.258241295 +0100 |
757 |
@@ -165,7 +165,7 @@ |
758 |
|
759 |
/* Dump returned file and stop */ |
760 |
if (nlog < 0) { |
761 |
- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); |
762 |
+ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); |
763 |
exit (0); |
764 |
} |
765 |
|
766 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/skybotread.c ./libwcs/skybotread.c |
767 |
--- ../wcstools-3.7.0.orig/libwcs/skybotread.c 2007-09-11 11:16:02.783147377 +0100 |
768 |
+++ ./libwcs/skybotread.c 2007-09-11 11:16:24.286228890 +0100 |
769 |
@@ -125,12 +125,11 @@ |
770 |
int nlog; /* 1 for diagnostics */ |
771 |
{ |
772 |
char srchurl[LINE]; |
773 |
- char cmag; |
774 |
char *obs; |
775 |
char *dstr; |
776 |
struct TabTable *tabtable; |
777 |
struct StarCat *starcat; /* Star catalog data structure */ |
778 |
- double dtemp, jdout; |
779 |
+ double jdout; |
780 |
int nstar, nlog0; |
781 |
double ra, dec, mag, dradi, dradx; |
782 |
char rastr[32], decstr[32], temp[256], tstr[80]; |
783 |
@@ -281,29 +280,22 @@ |
784 |
|
785 |
char *skybuff; /* Input comma-separated table */ |
786 |
{ |
787 |
- char *heading; |
788 |
char *colhead; |
789 |
char *colsep; |
790 |
char *tabbuff; /* Output tab-separated table */ |
791 |
char *tbuff; |
792 |
- char *databuff; |
793 |
char *dbuff; |
794 |
char *buffer; |
795 |
char *lastbuff; |
796 |
- char *endhead; |
797 |
char *colend; |
798 |
- char *chead; |
799 |
- char *head; |
800 |
char *tbuffi; |
801 |
char temp[16], format[16]; |
802 |
int lbuff, i, lra, icol; |
803 |
- int lhead, ldata; |
804 |
+ int lhead; |
805 |
int addname; |
806 |
int lobj; |
807 |
char cbuff; |
808 |
- char *buff; |
809 |
char cbar = '|'; |
810 |
- char ccom = ','; |
811 |
char cminus = '-'; |
812 |
char cspace = ' '; |
813 |
char ctab = (char) 9; |
814 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/tabread.c ./libwcs/tabread.c |
815 |
--- ../wcstools-3.7.0.orig/libwcs/tabread.c 2007-09-11 11:16:02.779147149 +0100 |
816 |
+++ ./libwcs/tabread.c 2007-09-11 11:16:24.306220030 +0100 |
817 |
@@ -147,7 +147,7 @@ |
818 |
int lname; |
819 |
int imag; |
820 |
double ra,dec, rapm, decpm; |
821 |
- double mag, parallax, rv; |
822 |
+ double mag = 0, parallax, rv; |
823 |
double num; |
824 |
int peak, i; |
825 |
int istar, nstars, lstar; |
826 |
@@ -596,7 +596,7 @@ |
827 |
} |
828 |
|
829 |
/* Check ID number first */ |
830 |
- (void) setoken (&startok, line, "tab"); |
831 |
+ setoken (&startok, line, "tab"); |
832 |
if (!strcmp (sc->isfil,"gsc-server")) { |
833 |
if (tabgetc (&startok, sc->entid, str, 24)) |
834 |
num = 0.0; |
835 |
@@ -782,7 +782,7 @@ |
836 |
int nstar; |
837 |
int imag; |
838 |
double ra,dec, rapm, decpm; |
839 |
- double mag, parallax, rv; |
840 |
+ double mag = 0, parallax, rv; |
841 |
double num; |
842 |
int peak; |
843 |
int istar, nstars, lstar; |
844 |
@@ -2163,7 +2163,7 @@ |
845 |
tabtable->lline = (nextline - tabtable->tabdata) * 2; |
846 |
tabtable->tabline = (char *) calloc (tabtable->lline, 1); |
847 |
fseek (tabtable->tcat, (long) tabtable->lhead, SEEK_SET); |
848 |
- (void) fgets (tabtable->tabline, tabtable->lline, tabtable->tcat); |
849 |
+ fgets (tabtable->tabline, tabtable->lline, tabtable->tcat); |
850 |
lline = strlen (tabtable->tabline); |
851 |
if (tabtable->tabline[lline-1] < 32) |
852 |
tabtable->tabline[lline-1] = (char) 0; |
853 |
@@ -2173,7 +2173,7 @@ |
854 |
/* Close catalog file if not reading one line at a time */ |
855 |
else { |
856 |
tabtable->lhead = 0; |
857 |
- (void) fclose (fcat); |
858 |
+ fclose (fcat); |
859 |
tabtable->tcat = NULL; |
860 |
} |
861 |
|
862 |
@@ -2245,7 +2245,7 @@ |
863 |
fseek (tabtable->tcat, (long) tabtable->lhead, SEEK_SET); |
864 |
tabtable->iline = 0; |
865 |
for (i = tabtable->iline; i < iline; i++) { |
866 |
- (void) fgets (tabtable->tabline, tabtable->lline, tabtable->tcat); |
867 |
+ fgets (tabtable->tabline, tabtable->lline, tabtable->tcat); |
868 |
tabtable->iline++; |
869 |
} |
870 |
lline = strlen (tabtable->tabline); |
871 |
@@ -2648,7 +2648,6 @@ |
872 |
return (0); |
873 |
} |
874 |
|
875 |
- |
876 |
/* Search table of column headings for first with string (case-independent) */ |
877 |
|
878 |
static int |
879 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/tmcread.c ./libwcs/tmcread.c |
880 |
--- ../wcstools-3.7.0.orig/libwcs/tmcread.c 2007-09-11 11:16:02.779147149 +0100 |
881 |
+++ ./libwcs/tmcread.c 2007-09-11 11:16:24.314216486 +0100 |
882 |
@@ -105,7 +105,7 @@ |
883 |
double eqref=2000.0; /* Catalog equinox */ |
884 |
double epref=2000.0; /* Catalog epoch */ |
885 |
double size = 0.0; /* Semi-major axis of extended source */ |
886 |
- struct StarCat *starcat; |
887 |
+ struct StarCat *starcat = NULL; |
888 |
struct Star *star; |
889 |
int verbose; |
890 |
int wrap; |
891 |
@@ -529,7 +529,7 @@ |
892 |
int sysref=WCS_J2000; /* Catalog coordinate system */ |
893 |
double eqref=2000.0; /* Catalog equinox */ |
894 |
double epref=2000.0; /* Catalog epoch */ |
895 |
- struct StarCat *starcat; |
896 |
+ struct StarCat *starcat = NULL; |
897 |
struct Star *star; |
898 |
char *str; |
899 |
|
900 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/wcs.c ./libwcs/wcs.c |
901 |
--- ../wcstools-3.7.0.orig/libwcs/wcs.c 2007-09-11 11:16:02.779147149 +0100 |
902 |
+++ ./libwcs/wcs.c 2007-09-11 11:16:24.326211170 +0100 |
903 |
@@ -1415,8 +1415,8 @@ |
904 |
double x2,y2; /* (RA,Dec) or (Long,Lat) in degrees */ |
905 |
|
906 |
{ |
907 |
- double xr1, xr2, yr1, yr2, r, diffi; |
908 |
- double pos1[3], pos2[3], w, diff, cosb; |
909 |
+ double diffi, r; |
910 |
+ double pos1[3], pos2[3], w, diff; |
911 |
int i; |
912 |
|
913 |
/* Convert two vectors to direction cosines */ |
914 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/wcsinit.c ./libwcs/wcsinit.c |
915 |
--- ../wcstools-3.7.0.orig/libwcs/wcsinit.c 2007-09-11 11:16:02.779147149 +0100 |
916 |
+++ ./libwcs/wcsinit.c 2007-09-11 11:16:24.334207626 +0100 |
917 |
@@ -1082,7 +1082,7 @@ |
918 |
static void |
919 |
wcseq (hstring, wcs) |
920 |
|
921 |
-char *hstring; /* character string containing FITS header information |
922 |
+const char *hstring; /* character string containing FITS header information |
923 |
in the format <keyword>= <value> [/ <comment>] */ |
924 |
struct WorldCoor *wcs; /* World coordinate system data structure */ |
925 |
{ |
926 |
diff -Nur ../wcstools-3.7.0.orig/libwcs/webread.c ./libwcs/webread.c |
927 |
--- ../wcstools-3.7.0.orig/libwcs/webread.c 2007-09-11 11:16:02.779147149 +0100 |
928 |
+++ ./libwcs/webread.c 2007-09-11 11:16:24.342204082 +0100 |
929 |
@@ -252,7 +252,7 @@ |
930 |
|
931 |
/* Dump returned file and stop */ |
932 |
if (nlog < 0) { |
933 |
- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); |
934 |
+ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); |
935 |
exit (0); |
936 |
} |
937 |
|
938 |
@@ -378,7 +378,7 @@ |
939 |
|
940 |
/* Dump returned file and stop */ |
941 |
if (nlog < 0) { |
942 |
- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); |
943 |
+ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); |
944 |
exit (0); |
945 |
} |
946 |
|
947 |
@@ -612,7 +612,7 @@ |
948 |
fflush(sok); |
949 |
free (server); |
950 |
|
951 |
- (void) fscanf(sok, "%*s %d %*s\r\n", &status); |
952 |
+ fscanf(sok, "%*s %d %*s\r\n", &status); |
953 |
|
954 |
/* Skip continue lines |
955 |
if (status == 100) { |
956 |
@@ -647,7 +647,7 @@ |
957 |
*lbuff = 0; |
958 |
ltbuff = 0; |
959 |
while (lline > 0) { |
960 |
- (void) fgets (linebuff, LINE, sok); |
961 |
+ fgets (linebuff, LINE, sok); |
962 |
lline = strlen (linebuff); |
963 |
if (lline < 1) |
964 |
break; |
965 |
@@ -689,7 +689,7 @@ |
966 |
else { |
967 |
buff = tabbuff + lcbuff; |
968 |
} |
969 |
- (void) fread (buff, 1, lchunk, sok); |
970 |
+ fread (buff, 1, lchunk, sok); |
971 |
buff[lchunk] = (char) 0; |
972 |
if (diag) |
973 |
fprintf (stderr, "%s\n", buff); |
974 |
@@ -730,7 +730,7 @@ |
975 |
fprintf (stderr, "%s\n", buff); |
976 |
} |
977 |
} |
978 |
- (void) fclose (sok); |
979 |
+ fclose (sok); |
980 |
|
981 |
return (tabbuff); |
982 |
} |
983 |
@@ -864,7 +864,7 @@ |
984 |
space2tab (tabbuff) |
985 |
char *tabbuff; /* Tab table filled with spaces */ |
986 |
{ |
987 |
- char *newbuff, *line0, *line1, *ic, *icn, *tstart; |
988 |
+ char *newbuff, *line0, *line1, *ic, *icn; |
989 |
char cspace, ctab, cdash; |
990 |
int lbuff; |
991 |
int alltab = 0; |
992 |
diff -Nur ../wcstools-3.7.0.orig/scat.c ./scat.c |
993 |
--- ../wcstools-3.7.0.orig/scat.c 2007-09-11 11:16:03.023161055 +0100 |
994 |
+++ ./scat.c 2007-09-11 11:16:24.378188133 +0100 |
995 |
@@ -1101,7 +1101,7 @@ |
996 |
double crao, cdeco; /* Output center long/lat or RA/Dec in degrees */ |
997 |
double epout = 0.0; |
998 |
int ng; /* Number of catalog stars */ |
999 |
- int ns; /* Number of brightest catalog stars actually used */ |
1000 |
+ int ns = 0; /* Number of brightest catalog stars actually used */ |
1001 |
struct Range *range = NULL; /* Range of catalog numbers to list */ |
1002 |
int nfind; /* Number of stars to find */ |
1003 |
int i, is, j, ngmax, nc; |
1004 |
@@ -1122,7 +1122,7 @@ |
1005 |
int nlog; |
1006 |
int magsort; |
1007 |
int typecol; |
1008 |
- int band; |
1009 |
+ int band = 0; |
1010 |
int imag, nmagr; |
1011 |
int sysout = 0; |
1012 |
char sortletter = (char) 0; |
1013 |
@@ -2366,7 +2366,7 @@ |
1014 |
printf (" %5.2f %5.2f %5.2f %5.2f %5.2f", |
1015 |
gm[0][0],gm[1][0],gm[2][0],gm[4][0],gm[5][0]); |
1016 |
else |
1017 |
- printf (" %5.2f %5.2f %5.2f %5.2f", |
1018 |
+ printf (" %5.2f %5.2f %5.2f %5.2f %5.2f", |
1019 |
gm[0][0],gm[1][0],gm[2][0],gm[4][0],gm[5][0]); |
1020 |
} |
1021 |
else if (refcat == HIP) { |
1022 |
diff -Nur ../wcstools-3.7.0.orig/setpix.c ./setpix.c |
1023 |
--- ../wcstools-3.7.0.orig/setpix.c 2007-09-11 11:16:03.023161055 +0100 |
1024 |
+++ ./setpix.c 2007-09-11 11:16:24.390182817 +0100 |
1025 |
@@ -258,9 +258,9 @@ |
1026 |
int lhead; /* Maximum number of bytes in FITS header */ |
1027 |
int nbhead; /* Actual number of bytes in FITS header */ |
1028 |
int iraffile; /* 1 if IRAF image */ |
1029 |
- char *irafheader; /* IRAF image header */ |
1030 |
+ char *irafheader = NULL; /* IRAF image header */ |
1031 |
int i, lext, lroot; |
1032 |
- int nx, ny, ix, iy, x, y, ipix; |
1033 |
+ int nx, ny, ix, iy, x, y, ipix = 0; |
1034 |
char *imext, *imext1; |
1035 |
double bzero; /* Zero point for pixel scaling */ |
1036 |
double bscale; /* Scale factor for pixel scaling */ |
1037 |
diff -Nur ../wcstools-3.7.0.orig/wcshead.c ./wcshead.c |
1038 |
--- ../wcstools-3.7.0.orig/wcshead.c 2007-09-11 11:16:03.083164474 +0100 |
1039 |
+++ ./wcshead.c 2007-09-11 11:16:24.398179273 +0100 |
1040 |
@@ -211,7 +211,7 @@ |
1041 |
char *GetFITShead(); |
1042 |
char rastr[32], decstr[32], fform[8]; |
1043 |
struct WorldCoor *wcs, *GetWCSFITS(); |
1044 |
- double wfrst, dwl, wlast, dxpix, zvel, vel; |
1045 |
+ double wfrst, dwl, wlast, dxpix, zvel = 0, vel; |
1046 |
int logwav = 0; |
1047 |
|
1048 |
if (rootdir){ |
1049 |
diff -Nur ../wcstools-3.7.0.orig/xy2sky.c ./xy2sky.c |
1050 |
--- ../wcstools-3.7.0.orig/xy2sky.c 2007-09-11 11:16:03.083164474 +0100 |
1051 |
+++ ./xy2sky.c 2007-09-11 11:16:24.398179273 +0100 |
1052 |
@@ -46,9 +46,9 @@ |
1053 |
static int ncm = 0; |
1054 |
static int printhead = 0; |
1055 |
static char printonly = 'n'; |
1056 |
-static int centerset = 0; |
1057 |
+/*static int centerset = 0; |
1058 |
static int sizeset = 0; |
1059 |
-static int scaleset = 0; |
1060 |
+static int scaleset = 0;*/ |
1061 |
static int version = 0; /* If 1, print only program name and version */ |
1062 |
|
1063 |
static char *RevMsg = "XY2SKY WCSTools 3.7.0, 28 August 2007, Doug Mink (dmink@×××××××××××.edu)"; |
1064 |
@@ -70,9 +70,9 @@ |
1065 |
int entmag = 0; |
1066 |
int i, ic; |
1067 |
double x, y, mag; |
1068 |
- double cra, cdec, dra, ddec, secpix, drot; |
1069 |
+ double cra, cdec, dra, ddec, secpix;/*, drot;*/ |
1070 |
double eqout = 0.0; |
1071 |
- double eqin = 0.0; |
1072 |
+ /*double eqin = 0.0;*/ |
1073 |
int sysout = 0; |
1074 |
int wp, hp, nx, ny, lhead; |
1075 |
FILE *fd = NULL; |
1076 |
@@ -82,7 +82,7 @@ |
1077 |
char *header; |
1078 |
char *fn; |
1079 |
int bitpix = 0; |
1080 |
- struct WorldCoor *wcs; |
1081 |
+ struct WorldCoor *wcs = NULL; |
1082 |
char xstr[32], ystr[32], mstr[32]; |
1083 |
char rastr[32], decstr[32]; |
1084 |
char keyword[16]; |
1085 |
|
1086 |
|
1087 |
|
1088 |
1.1 sci-astronomy/wcstools/files/wcstools-3.7.0-autotools.patch |
1089 |
|
1090 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.7.0-autotools.patch?rev=1.1&view=markup |
1091 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.7.0-autotools.patch?rev=1.1&content-type=text/plain |
1092 |
|
1093 |
Index: wcstools-3.7.0-autotools.patch |
1094 |
=================================================================== |
1095 |
--- configure.ac 1970-01-01 01:00:00.000000000 +0100 |
1096 |
+++ configure.ac 2007-09-11 10:35:36.003123884 +0100 |
1097 |
@@ -0,0 +1,11 @@ |
1098 |
+AC_PREREQ([2.59]) |
1099 |
+AC_INIT(wcstools, 3.7.x, [http://tdc-www.harvard.edu/wcstools/]) |
1100 |
+AM_INIT_AUTOMAKE([foreign]) |
1101 |
+AM_CONFIG_HEADER(config.h) |
1102 |
+ |
1103 |
+AC_PROG_CC |
1104 |
+AC_PROG_LIBTOOL |
1105 |
+AC_C_CONST |
1106 |
+AC_CHECK_LIB(m, sin) |
1107 |
+AC_CONFIG_FILES([libwcs/Makefile Makefile]) |
1108 |
+AC_OUTPUT |
1109 |
--- Makefile.am 1970-01-01 01:00:00.000000000 +0100 |
1110 |
+++ Makefile.am 2007-09-11 10:35:09.945638953 +0100 |
1111 |
@@ -0,0 +1,65 @@ |
1112 |
+SUBDIRS = libwcs |
1113 |
+INCLUDES = -I$(top_srcdir)/libwcs |
1114 |
+ |
1115 |
+bin_SCRIPTS = wcstools |
1116 |
+ |
1117 |
+bin_PROGRAMS = \ |
1118 |
+ cphead delwcs delhead edhead fixpix gethead i2f imcat imhead immatch \ |
1119 |
+ imrot imsize imstar imwcs scat sethead addpix getpix setpix sky2xy \ |
1120 |
+ keyhead skycoor subpix xy2sky wcshead conpix gettab newfits getfits \ |
1121 |
+ imstack imextract sumpix remap getcol getdate imfill imsmooth imresize \ |
1122 |
+ fileroot filename filext char2sp sp2char crlf isnum isrange simpos bincat |
1123 |
+ |
1124 |
+# these ones don't need libwcs |
1125 |
+crlf_SOURCES = crlf.c |
1126 |
+filename_SOURCES = filename.c |
1127 |
+fileroot_SOURCES = fileroot.c |
1128 |
+filext_SOURCES = filext.c |
1129 |
+isrange_SOURCES = isrange.c |
1130 |
+ |
1131 |
+LDADD = $(top_builddir)/libwcs/libwcs.la |
1132 |
+ |
1133 |
+bincat_SOURCES = bincat.c |
1134 |
+getcol_SOURCES = getcol.c |
1135 |
+getdate_SOURCES = getdate.c |
1136 |
+gethead_SOURCES = gethead.c |
1137 |
+getfits_SOURCES = getfits.c |
1138 |
+getpix_SOURCES = getpix.c |
1139 |
+gettab_SOURCES = gettab.c |
1140 |
+imcat_SOURCES = imcat.c |
1141 |
+imsize_SOURCES = imsize.c |
1142 |
+imstar_SOURCES = imstar.c |
1143 |
+imwcs_SOURCES = imwcs.c |
1144 |
+immatch_SOURCES = immatch.c |
1145 |
+scat_SOURCES = scat.c |
1146 |
+setpix_SOURCES = setpix.c |
1147 |
+skycoor_SOURCES = skycoor.c |
1148 |
+sumpix_SOURCES = sumpix.c |
1149 |
+xy2sky_SOURCES = xy2sky.c |
1150 |
+simpos_SOURCES = simpos.c |
1151 |
+ |
1152 |
+addpix_SOURCES = addpix.c |
1153 |
+char2sp_SOURCES = char2sp.c |
1154 |
+conpix_SOURCES = conpix.c |
1155 |
+cphead_SOURCES = cphead.c |
1156 |
+delwcs_SOURCES = delwcs.c |
1157 |
+delhead_SOURCES = delhead.c |
1158 |
+edhead_SOURCES = edhead.c |
1159 |
+fixpix_SOURCES = fixpix.c |
1160 |
+i2f_SOURCES = i2f.c |
1161 |
+imfill_SOURCES = imfill.c |
1162 |
+imresize_SOURCES = imresize.c |
1163 |
+imsmooth_SOURCES = imsmooth.c |
1164 |
+imhead_SOURCES = imhead.c |
1165 |
+imrot_SOURCES = imrot.c |
1166 |
+imstack_SOURCES = imstack.c |
1167 |
+imextract_SOURCES = imextract.c |
1168 |
+isnum_SOURCES = isnum.c |
1169 |
+keyhead_SOURCES = keyhead.c |
1170 |
+newfits_SOURCES = newfits.c |
1171 |
+remap_SOURCES = remap.c |
1172 |
+sethead_SOURCES = sethead.c |
1173 |
+sky2xy_SOURCES = sky2xy.c |
1174 |
+sp2char_SOURCES = sp2char.c |
1175 |
+subpix_SOURCES = subpix.c |
1176 |
+wcshead_SOURCES = wcshead.c |
1177 |
--- libwcs/Makefile.am 1970-01-01 01:00:00.000000000 +0100 |
1178 |
+++ libwcs/Makefile.am 2007-09-10 21:36:59.509608482 +0100 |
1179 |
@@ -0,0 +1,17 @@ |
1180 |
+lib_LTLIBRARIES = libwcs.la |
1181 |
+libwcs_la_SOURCES = \ |
1182 |
+ imsetwcs.c imgetwcs.c matchstar.c findstar.c daoread.c wcscon.c \ |
1183 |
+ fitswcs.c wcsinit.c wcs.c ty2read.c webread.c tmcread.c \ |
1184 |
+ gscread.c gsc2read.c ujcread.c uacread.c ubcread.c ucacread.c \ |
1185 |
+ sdssread.c tabread.c binread.c ctgread.c actread.c catutil.c \ |
1186 |
+ skybotread.c imrotate.c fitsfile.c imhfile.c \ |
1187 |
+ hget.c hput.c imio.c dateutil.c imutil.c \ |
1188 |
+ worldpos.c tnxpos.c dsspos.c platepos.c \ |
1189 |
+ sortstar.c platefit.c iget.c fileutil.c \ |
1190 |
+ wcslib.c lin.c cel.c proj.c sph.c wcstrig.c distort.c |
1191 |
+ |
1192 |
+wcsdir = $(includedir)/wcs |
1193 |
+wcs_HEADERS = \ |
1194 |
+ wcscat.h wcslib.h wcs.h lwcs.h fitshead.h fitsfile.h imio.h |
1195 |
+ |
1196 |
+noinst_HEADERS = fitsfile1.h wcscat1.h |
1197 |
|
1198 |
|
1199 |
|
1200 |
1.1 sci-astronomy/wcstools/files/digest-wcstools-3.7.0 |
1201 |
|
1202 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/wcstools/files/digest-wcstools-3.7.0?rev=1.1&view=markup |
1203 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/wcstools/files/digest-wcstools-3.7.0?rev=1.1&content-type=text/plain |
1204 |
|
1205 |
Index: digest-wcstools-3.7.0 |
1206 |
=================================================================== |
1207 |
MD5 d9d889916492ef6bbbe9379bb5448db0 wcstools-3.7.0.tar.gz 835182 |
1208 |
RMD160 2fd9086f0b53914e32d0b7ac30bfdb0da66bf6c0 wcstools-3.7.0.tar.gz 835182 |
1209 |
SHA256 7f6ba365a044d0e962499b248a154a732578d948f374670133dc8809c3f17453 wcstools-3.7.0.tar.gz 835182 |
1210 |
|
1211 |
|
1212 |
|
1213 |
1.1 sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch |
1214 |
|
1215 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch?rev=1.1&view=markup |
1216 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch?rev=1.1&content-type=text/plain |
1217 |
|
1218 |
Index: wcstools-3.7.0-fix-leaks.patch |
1219 |
=================================================================== |
1220 |
--- libwcs/imhfile.c.orig 2007-09-11 11:01:02.247828794 +0100 |
1221 |
+++ libwcs/imhfile.c 2007-09-11 11:00:39.330522811 +0100 |
1222 |
@@ -1036,11 +1036,11 @@ |
1223 |
int len; |
1224 |
char *newpixname; |
1225 |
|
1226 |
- newpixname = (char *) calloc (SZ_IM2PIXFILE, 1); |
1227 |
+ newpixname = (char *) calloc (SZ_IM2PIXFILE + 1, sizeof(char)); |
1228 |
|
1229 |
/* Pixel file is in same directory as header */ |
1230 |
if (strncmp(pixname, "HDR$", 4) == 0 ) { |
1231 |
- (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE); |
1232 |
+ strncpy (newpixname, hdrname, SZ_IM2PIXFILE); |
1233 |
|
1234 |
/* find the end of the pathname */ |
1235 |
len = strlen (newpixname); |
1236 |
@@ -1053,7 +1053,7 @@ |
1237 |
|
1238 |
/* add name */ |
1239 |
newpixname[len] = '\0'; |
1240 |
- (void)strncat (newpixname, &pixname[4], SZ_IM2PIXFILE); |
1241 |
+ strncat (newpixname, &pixname[4], SZ_IM2PIXFILE); |
1242 |
} |
1243 |
|
1244 |
/* Bare pixel file with no path is assumed to be same as HDR$filename */ |
1245 |
--- libwcs/imsetwcs.c.orig 2007-09-11 11:04:54.757078741 +0100 |
1246 |
+++ libwcs/imsetwcs.c 2007-09-11 11:04:31.563757029 +0100 |
1247 |
@@ -854,13 +854,13 @@ |
1248 |
if (gc) free ((char *)gc); |
1249 |
|
1250 |
/* Free memory used for object names in reference catalog */ |
1251 |
- if (gobj1 != NULL) { |
1252 |
+ /* if (gobj1 != NULL) { |
1253 |
for (i = 0; i < ns; i++) { |
1254 |
if (gobj[i] != NULL) free (gobj[i]); |
1255 |
gobj[i] = NULL; |
1256 |
} |
1257 |
} |
1258 |
- |
1259 |
+ */ |
1260 |
/* Free image source arrays */ |
1261 |
if (sx) free ((char *)sx); |
1262 |
if (sy) free ((char *)sy); |
1263 |
|
1264 |
|
1265 |
|
1266 |
-- |
1267 |
gentoo-commits@g.o mailing list |