summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2007-09-11 11:21:25 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2007-09-11 11:21:25 +0000
commit04c26e0d0fe5cc84385c4f00881147570d8cab5c (patch)
treec315050c2e7fafc49127958b182d38dc8616a06c /sci-astronomy
parentPort to new GNUstep eclasses (diff)
downloadhistorical-04c26e0d0fe5cc84385c4f00881147570d8cab5c.tar.gz
historical-04c26e0d0fe5cc84385c4f00881147570d8cab5c.tar.bz2
historical-04c26e0d0fe5cc84385c4f00881147570d8cab5c.zip
Version bump. Adapted patches and fixed leaks. Closing bug #191884
Package-Manager: portage-2.1.2.12
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/wcstools/ChangeLog11
-rw-r--r--sci-astronomy/wcstools/Manifest38
-rw-r--r--sci-astronomy/wcstools/files/digest-wcstools-3.7.03
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.6.7-codewarn.patch36
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.7.0-autotools.patch102
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch43
-rw-r--r--sci-astronomy/wcstools/files/wcstools-3.7.0-fix-warnings.patch1065
-rw-r--r--sci-astronomy/wcstools/wcstools-3.7.0.ebuild42
8 files changed, 1292 insertions, 48 deletions
diff --git a/sci-astronomy/wcstools/ChangeLog b/sci-astronomy/wcstools/ChangeLog
index 046a5ddec047..5418e0996486 100644
--- a/sci-astronomy/wcstools/ChangeLog
+++ b/sci-astronomy/wcstools/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-astronomy/wcstools
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/wcstools/ChangeLog,v 1.4 2007/06/05 16:35:59 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/wcstools/ChangeLog,v 1.5 2007/09/11 11:21:24 bicatali Exp $
+
+*wcstools-3.7.0 (11 Sep 2007)
+
+ 11 Sep 2007; SĂ©bastien Fabbro <bicatali@gentoo.org>
+ -files/wcstools-3.6.7-codewarn.patch,
+ +files/wcstools-3.7.0-autotools.patch,
+ +files/wcstools-3.7.0-fix-leaks.patch,
+ +files/wcstools-3.7.0-fix-warnings.patch, +wcstools-3.7.0.ebuild:
+ Version bump. Adapted patches and fixed leaks. Closing bug #191884
*wcstools-3.6.8 (05 Jun 2007)
diff --git a/sci-astronomy/wcstools/Manifest b/sci-astronomy/wcstools/Manifest
index d174c6405dd9..91fe45c0e7bd 100644
--- a/sci-astronomy/wcstools/Manifest
+++ b/sci-astronomy/wcstools/Manifest
@@ -1,10 +1,6 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-AUX wcstools-3.6.7-codewarn.patch 1312 RMD160 c4a9d1b523415a9d87c34e14294a600305410fc0 SHA1 151bd08afb0682def1154f934d23e7538fa995ac SHA256 4326961269c18455a2c8f49cc8bfbeefcd637bf690f264b040491b2aa15cd3c5
-MD5 97ee0e2a0c71faf06840632f9b7b1d65 files/wcstools-3.6.7-codewarn.patch 1312
-RMD160 c4a9d1b523415a9d87c34e14294a600305410fc0 files/wcstools-3.6.7-codewarn.patch 1312
-SHA256 4326961269c18455a2c8f49cc8bfbeefcd637bf690f264b040491b2aa15cd3c5 files/wcstools-3.6.7-codewarn.patch 1312
AUX wcstools-3.6.8-autotools.patch 4674 RMD160 52431056403b47afc3efd306ba2c17ff25a9e5ab SHA1 24aaf06bfbdbf8ab42f006e667e1157b917efc27 SHA256 41825dbfa6eab2a955baeb5e506b2d8fc189868aed581026a974317a871b45d0
MD5 c6f18782a7009e6e81de86879954e882 files/wcstools-3.6.8-autotools.patch 4674
RMD160 52431056403b47afc3efd306ba2c17ff25a9e5ab files/wcstools-3.6.8-autotools.patch 4674
@@ -13,15 +9,32 @@ AUX wcstools-3.6.8-imsetwcs.patch 509 RMD160 a96e8bf24959267cb618350e91293782ba9
MD5 7a90793af22fbc9ec6e9ebda1bf84154 files/wcstools-3.6.8-imsetwcs.patch 509
RMD160 a96e8bf24959267cb618350e91293782ba9c59ce files/wcstools-3.6.8-imsetwcs.patch 509
SHA256 80d34d8ac6b34579c891254e96239649ed7fde60f042b8fd289fefacd1d1e2f1 files/wcstools-3.6.8-imsetwcs.patch 509
+AUX wcstools-3.7.0-autotools.patch 3215 RMD160 e36d7705ee713779dd4aeb8e3a86a6ebb04451c5 SHA1 22914fee3b3cd2fce2a92633f5f71e4de5c5f454 SHA256 21ac6a4e7466b2c42ae1334a42491f7b92d35797cb8d7cd5db1ecfe0da827f93
+MD5 48ce2e2c79c667cf87eed60187bb77a0 files/wcstools-3.7.0-autotools.patch 3215
+RMD160 e36d7705ee713779dd4aeb8e3a86a6ebb04451c5 files/wcstools-3.7.0-autotools.patch 3215
+SHA256 21ac6a4e7466b2c42ae1334a42491f7b92d35797cb8d7cd5db1ecfe0da827f93 files/wcstools-3.7.0-autotools.patch 3215
+AUX wcstools-3.7.0-fix-leaks.patch 1354 RMD160 035017589cbf2fa6987b7f371b0528e2110c8572 SHA1 f02a6e3bc92770acedf94d7d9e572b8e9b30611c SHA256 4d670ef8a44f01ee887b0b73daf2a6ef007ddb9f2d80772a736bbb6719708ddc
+MD5 dce01dcf091f12e3d310b52eeadf2bbd files/wcstools-3.7.0-fix-leaks.patch 1354
+RMD160 035017589cbf2fa6987b7f371b0528e2110c8572 files/wcstools-3.7.0-fix-leaks.patch 1354
+SHA256 4d670ef8a44f01ee887b0b73daf2a6ef007ddb9f2d80772a736bbb6719708ddc files/wcstools-3.7.0-fix-leaks.patch 1354
+AUX wcstools-3.7.0-fix-warnings.patch 34049 RMD160 edf4d5a17f5c2638500e6bccd94bd6c26e94d140 SHA1 d5624fb56bc3835880f3d92e01c648a826b24dbb SHA256 3201f1451b0c548232dd372aa1bf98c39a1f0648c9e0d2a67fc59c52e3124fa6
+MD5 767d735af24db203382684a0fa52d98f files/wcstools-3.7.0-fix-warnings.patch 34049
+RMD160 edf4d5a17f5c2638500e6bccd94bd6c26e94d140 files/wcstools-3.7.0-fix-warnings.patch 34049
+SHA256 3201f1451b0c548232dd372aa1bf98c39a1f0648c9e0d2a67fc59c52e3124fa6 files/wcstools-3.7.0-fix-warnings.patch 34049
DIST wcstools-3.6.8.tar.gz 801764 RMD160 4414c0ec30c2d3583ead35ac5df18a362da50427 SHA1 7af74108e21926d803b7d93b5d6fee4ccdceb091 SHA256 f96b3b3c346a136877ef7fcc8a86fd994c4dbcacc637a454b29e99064ac1d729
+DIST wcstools-3.7.0.tar.gz 835182 RMD160 2fd9086f0b53914e32d0b7ac30bfdb0da66bf6c0 SHA1 e1648199ed3fa85c1ff88e0e3309e78833f3e37b SHA256 7f6ba365a044d0e962499b248a154a732578d948f374670133dc8809c3f17453
EBUILD wcstools-3.6.8.ebuild 1279 RMD160 83f48744c6f00f476a100a9d01da28eb6dcd8aa8 SHA1 bce6afa7b9b3e6405f73f4d0a4328ce6597ef4ac SHA256 c099e8ca9c1f2cdbd30eab35edd240ed80199c28a50e211c0614d97290bd0b2f
MD5 db8809a2cf7457b46b30142613fbdf5d wcstools-3.6.8.ebuild 1279
RMD160 83f48744c6f00f476a100a9d01da28eb6dcd8aa8 wcstools-3.6.8.ebuild 1279
SHA256 c099e8ca9c1f2cdbd30eab35edd240ed80199c28a50e211c0614d97290bd0b2f wcstools-3.6.8.ebuild 1279
-MISC ChangeLog 1550 RMD160 a24c9dec267fc34e5cf04d12df5efcc6a91e0905 SHA1 cfa5365b69d1156bb978151c09c07b817e2b84df SHA256 05f1a31358c6392877a70c89b22ef832eaaff51210ea41ae53b913ac0e8a48ff
-MD5 4f3062f075c851615c36833a4beefdaa ChangeLog 1550
-RMD160 a24c9dec267fc34e5cf04d12df5efcc6a91e0905 ChangeLog 1550
-SHA256 05f1a31358c6392877a70c89b22ef832eaaff51210ea41ae53b913ac0e8a48ff ChangeLog 1550
+EBUILD wcstools-3.7.0.ebuild 1358 RMD160 35498ac7c7e3e2e26c2cd797e7f9c06c368786bf SHA1 6d95943f00080d47606e2ed71d4d542ac0c69b1f SHA256 fc7d63c380dbb0da9e2c80ecc4965aaba75471becf8c6965907cf2ddbf61c206
+MD5 bc3582747209044883add2dbcc214302 wcstools-3.7.0.ebuild 1358
+RMD160 35498ac7c7e3e2e26c2cd797e7f9c06c368786bf wcstools-3.7.0.ebuild 1358
+SHA256 fc7d63c380dbb0da9e2c80ecc4965aaba75471becf8c6965907cf2ddbf61c206 wcstools-3.7.0.ebuild 1358
+MISC ChangeLog 1896 RMD160 c7538422c8460b69e9c696aa6822534364ef2a4e SHA1 0bf4b53a1f6a85eb9aec70e076ca5ff1fede23d6 SHA256 0aa9f2dc1a24f44e2f99723e35b814cb6090d2018d4ca6529fd6264cc34de5dd
+MD5 e4fff23dd0830a228ac49106ee445d55 ChangeLog 1896
+RMD160 c7538422c8460b69e9c696aa6822534364ef2a4e ChangeLog 1896
+SHA256 0aa9f2dc1a24f44e2f99723e35b814cb6090d2018d4ca6529fd6264cc34de5dd ChangeLog 1896
MISC metadata.xml 723 RMD160 49c0f1f71c12801e00b02be8b39f46c74cf1890d SHA1 32a6c9c6b8e0ea96a79f2444578233ec1de7af3d SHA256 56010e1e3bae1f5d3210ce32ba4bbbfb6ba7d245c7d2932444f923f71591d288
MD5 7964d0ff6dd5253f03ca707e97d136c3 metadata.xml 723
RMD160 49c0f1f71c12801e00b02be8b39f46c74cf1890d metadata.xml 723
@@ -29,10 +42,13 @@ SHA256 56010e1e3bae1f5d3210ce32ba4bbbfb6ba7d245c7d2932444f923f71591d288 metadata
MD5 bfcf0d8d41090fb73379573008ee1d16 files/digest-wcstools-3.6.8 244
RMD160 1723713e2d6e0ed94ba93b3b11a35feb564c61f6 files/digest-wcstools-3.6.8 244
SHA256 79240f3d967c36b27d1483bc56e89c0aa0e1fe365888635fe32504b2b8a7879f files/digest-wcstools-3.6.8 244
+MD5 41b241b7ac8c867dcab9e09dd452a738 files/digest-wcstools-3.7.0 244
+RMD160 c16113e3f6aa09053017cc2d109e60a8bb071254 files/digest-wcstools-3.7.0 244
+SHA256 c5dbc1b25ac97a094fb10f83d9100d4e6806d4a4033df7dae19ea6774f9bae18 files/digest-wcstools-3.7.0 244
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
-iD8DBQFGZZD11ycZbhPLE2ARAvUxAJ9pP3eV7L+u+dPl4QDgBC2mMVqJeQCgkGlK
-EHKBM2mTgaim0H7RY5mcxXY=
-=0fqv
+iD8DBQFG5no71ycZbhPLE2ARAlxYAJ0X3yZl/egchPWEycQkw+XxctIvkwCgmsqb
+9kVM8VXCHzBPscxilhUXE7M=
+=n+kT
-----END PGP SIGNATURE-----
diff --git a/sci-astronomy/wcstools/files/digest-wcstools-3.7.0 b/sci-astronomy/wcstools/files/digest-wcstools-3.7.0
new file mode 100644
index 000000000000..1e5ba583618a
--- /dev/null
+++ b/sci-astronomy/wcstools/files/digest-wcstools-3.7.0
@@ -0,0 +1,3 @@
+MD5 d9d889916492ef6bbbe9379bb5448db0 wcstools-3.7.0.tar.gz 835182
+RMD160 2fd9086f0b53914e32d0b7ac30bfdb0da66bf6c0 wcstools-3.7.0.tar.gz 835182
+SHA256 7f6ba365a044d0e962499b248a154a732578d948f374670133dc8809c3f17453 wcstools-3.7.0.tar.gz 835182
diff --git a/sci-astronomy/wcstools/files/wcstools-3.6.7-codewarn.patch b/sci-astronomy/wcstools/files/wcstools-3.6.7-codewarn.patch
deleted file mode 100644
index 71604171e2e8..000000000000
--- a/sci-astronomy/wcstools/files/wcstools-3.6.7-codewarn.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Nur ../wcstools-3.6.7.orig/getdate.c ./getdate.c
---- ../wcstools-3.6.7.orig/getdate.c 2007-01-10 19:59:34.000000000 +0000
-+++ ./getdate.c 2007-02-21 15:33:41.000000000 +0000
-@@ -412,7 +412,7 @@
- char *fitsdate, *newfdate, *stdate;
- char temp[64];
- char fyear[16];
-- char ts0[8];
-+ char ts0[9];
- char *tchar;
- int its, its1;
- time_t lts;
-diff -Nur ../wcstools-3.6.7.orig/libwcs/binread.c ./libwcs/binread.c
---- ../wcstools-3.6.7.orig/libwcs/binread.c 2007-01-10 18:28:19.000000000 +0000
-+++ ./libwcs/binread.c 2007-02-21 15:34:40.000000000 +0000
-@@ -1372,7 +1372,7 @@
- for (i = 0; i < nmag; i++) {
- moveb (sc->catline, (char *) st->mag, 2, sc->entmag[0]+(i*2), i*2);
- if (sc->byteswapped)
-- binswap2 (&st->mag[i], 2);
-+ binswap2 ((char*)&st->mag[i], 2);
- st->xmag[i] = 0.01 * (double) st->mag[i];
- }
- }
-diff -Nur ../wcstools-3.6.7.orig/libwcs/catutil.c ./libwcs/catutil.c
---- ../wcstools-3.6.7.orig/libwcs/catutil.c 2007-01-10 17:33:31.000000000 +0000
-+++ ./libwcs/catutil.c 2007-02-21 15:35:46.000000000 +0000
-@@ -726,7 +726,7 @@
- lname = 0;
- else
- lname = strlen (refcatname);
-- catname = (char *)calloc (lname + 16, 1);
-+ catname = (char *)calloc (lname + 37, 1);
- if (lname > 0)
- sprintf (catname, "%s sources", refcatname);
- else
diff --git a/sci-astronomy/wcstools/files/wcstools-3.7.0-autotools.patch b/sci-astronomy/wcstools/files/wcstools-3.7.0-autotools.patch
new file mode 100644
index 000000000000..d7194410728f
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.7.0-autotools.patch
@@ -0,0 +1,102 @@
+--- configure.ac 1970-01-01 01:00:00.000000000 +0100
++++ configure.ac 2007-09-11 10:35:36.003123884 +0100
+@@ -0,0 +1,11 @@
++AC_PREREQ([2.59])
++AC_INIT(wcstools, 3.7.x, [http://tdc-www.harvard.edu/wcstools/])
++AM_INIT_AUTOMAKE([foreign])
++AM_CONFIG_HEADER(config.h)
++
++AC_PROG_CC
++AC_PROG_LIBTOOL
++AC_C_CONST
++AC_CHECK_LIB(m, sin)
++AC_CONFIG_FILES([libwcs/Makefile Makefile])
++AC_OUTPUT
+--- Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ Makefile.am 2007-09-11 10:35:09.945638953 +0100
+@@ -0,0 +1,65 @@
++SUBDIRS = libwcs
++INCLUDES = -I$(top_srcdir)/libwcs
++
++bin_SCRIPTS = wcstools
++
++bin_PROGRAMS = \
++ cphead delwcs delhead edhead fixpix gethead i2f imcat imhead immatch \
++ imrot imsize imstar imwcs scat sethead addpix getpix setpix sky2xy \
++ keyhead skycoor subpix xy2sky wcshead conpix gettab newfits getfits \
++ imstack imextract sumpix remap getcol getdate imfill imsmooth imresize \
++ fileroot filename filext char2sp sp2char crlf isnum isrange simpos bincat
++
++# these ones don't need libwcs
++crlf_SOURCES = crlf.c
++filename_SOURCES = filename.c
++fileroot_SOURCES = fileroot.c
++filext_SOURCES = filext.c
++isrange_SOURCES = isrange.c
++
++LDADD = $(top_builddir)/libwcs/libwcs.la
++
++bincat_SOURCES = bincat.c
++getcol_SOURCES = getcol.c
++getdate_SOURCES = getdate.c
++gethead_SOURCES = gethead.c
++getfits_SOURCES = getfits.c
++getpix_SOURCES = getpix.c
++gettab_SOURCES = gettab.c
++imcat_SOURCES = imcat.c
++imsize_SOURCES = imsize.c
++imstar_SOURCES = imstar.c
++imwcs_SOURCES = imwcs.c
++immatch_SOURCES = immatch.c
++scat_SOURCES = scat.c
++setpix_SOURCES = setpix.c
++skycoor_SOURCES = skycoor.c
++sumpix_SOURCES = sumpix.c
++xy2sky_SOURCES = xy2sky.c
++simpos_SOURCES = simpos.c
++
++addpix_SOURCES = addpix.c
++char2sp_SOURCES = char2sp.c
++conpix_SOURCES = conpix.c
++cphead_SOURCES = cphead.c
++delwcs_SOURCES = delwcs.c
++delhead_SOURCES = delhead.c
++edhead_SOURCES = edhead.c
++fixpix_SOURCES = fixpix.c
++i2f_SOURCES = i2f.c
++imfill_SOURCES = imfill.c
++imresize_SOURCES = imresize.c
++imsmooth_SOURCES = imsmooth.c
++imhead_SOURCES = imhead.c
++imrot_SOURCES = imrot.c
++imstack_SOURCES = imstack.c
++imextract_SOURCES = imextract.c
++isnum_SOURCES = isnum.c
++keyhead_SOURCES = keyhead.c
++newfits_SOURCES = newfits.c
++remap_SOURCES = remap.c
++sethead_SOURCES = sethead.c
++sky2xy_SOURCES = sky2xy.c
++sp2char_SOURCES = sp2char.c
++subpix_SOURCES = subpix.c
++wcshead_SOURCES = wcshead.c
+--- libwcs/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ libwcs/Makefile.am 2007-09-10 21:36:59.509608482 +0100
+@@ -0,0 +1,17 @@
++lib_LTLIBRARIES = libwcs.la
++libwcs_la_SOURCES = \
++ imsetwcs.c imgetwcs.c matchstar.c findstar.c daoread.c wcscon.c \
++ fitswcs.c wcsinit.c wcs.c ty2read.c webread.c tmcread.c \
++ gscread.c gsc2read.c ujcread.c uacread.c ubcread.c ucacread.c \
++ sdssread.c tabread.c binread.c ctgread.c actread.c catutil.c \
++ skybotread.c imrotate.c fitsfile.c imhfile.c \
++ hget.c hput.c imio.c dateutil.c imutil.c \
++ worldpos.c tnxpos.c dsspos.c platepos.c \
++ sortstar.c platefit.c iget.c fileutil.c \
++ wcslib.c lin.c cel.c proj.c sph.c wcstrig.c distort.c
++
++wcsdir = $(includedir)/wcs
++wcs_HEADERS = \
++ wcscat.h wcslib.h wcs.h lwcs.h fitshead.h fitsfile.h imio.h
++
++noinst_HEADERS = fitsfile1.h wcscat1.h
diff --git a/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch b/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch
new file mode 100644
index 000000000000..737f6d230dae
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch
@@ -0,0 +1,43 @@
+--- libwcs/imhfile.c.orig 2007-09-11 11:01:02.247828794 +0100
++++ libwcs/imhfile.c 2007-09-11 11:00:39.330522811 +0100
+@@ -1036,11 +1036,11 @@
+ int len;
+ char *newpixname;
+
+- newpixname = (char *) calloc (SZ_IM2PIXFILE, 1);
++ newpixname = (char *) calloc (SZ_IM2PIXFILE + 1, sizeof(char));
+
+ /* Pixel file is in same directory as header */
+ if (strncmp(pixname, "HDR$", 4) == 0 ) {
+- (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE);
++ strncpy (newpixname, hdrname, SZ_IM2PIXFILE);
+
+ /* find the end of the pathname */
+ len = strlen (newpixname);
+@@ -1053,7 +1053,7 @@
+
+ /* add name */
+ newpixname[len] = '\0';
+- (void)strncat (newpixname, &pixname[4], SZ_IM2PIXFILE);
++ strncat (newpixname, &pixname[4], SZ_IM2PIXFILE);
+ }
+
+ /* Bare pixel file with no path is assumed to be same as HDR$filename */
+--- libwcs/imsetwcs.c.orig 2007-09-11 11:04:54.757078741 +0100
++++ libwcs/imsetwcs.c 2007-09-11 11:04:31.563757029 +0100
+@@ -854,13 +854,13 @@
+ if (gc) free ((char *)gc);
+
+ /* Free memory used for object names in reference catalog */
+- if (gobj1 != NULL) {
++ /* if (gobj1 != NULL) {
+ for (i = 0; i < ns; i++) {
+ if (gobj[i] != NULL) free (gobj[i]);
+ gobj[i] = NULL;
+ }
+ }
+-
++ */
+ /* Free image source arrays */
+ if (sx) free ((char *)sx);
+ if (sy) free ((char *)sy);
diff --git a/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-warnings.patch b/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-warnings.patch
new file mode 100644
index 000000000000..d3e00f0bc386
--- /dev/null
+++ b/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-warnings.patch
@@ -0,0 +1,1065 @@
+diff -Nur ../wcstools-3.7.0.orig/bincat.c ./bincat.c
+--- ../wcstools-3.7.0.orig/bincat.c 2007-09-11 11:16:02.875152620 +0100
++++ ./bincat.c 2007-09-11 11:16:23.654508873 +0100
+@@ -90,7 +90,7 @@
+ char *lastchar;
+ char filename[128];
+ FILE *flist;
+- char *listfile;
++ char *listfile = NULL;
+ char rastr[32], decstr[32];
+ double x, y;
+ char cs1;
+diff -Nur ../wcstools-3.7.0.orig/cphead.c ./cphead.c
+--- ../wcstools-3.7.0.orig/cphead.c 2007-09-11 11:16:02.899153988 +0100
++++ ./cphead.c 2007-09-11 11:16:23.670501784 +0100
+@@ -357,7 +357,7 @@
+ double dval;
+ int ival, nch;
+ int iraffile;
+- int ndec, nbheadout, nbheadin, nbheader;
++ int ndec, nbheadout = 0, nbheadin, nbheader;
+ char newname[128];
+ char string[80];
+ char *kw, *kwe, *filepath, *fname, *ext, *imext, *imext1;
+diff -Nur ../wcstools-3.7.0.orig/crlf.c ./crlf.c
+--- ../wcstools-3.7.0.orig/crlf.c 2007-09-11 11:16:02.899153988 +0100
++++ ./crlf.c 2007-09-11 11:16:23.686494696 +0100
+@@ -99,7 +99,7 @@
+ if (buffer[i] == (char) 13)
+ buffer[i] = (char) 10;
+ }
+- (void) write (1, buffer, nbr);
++ write (1, buffer, nbr);
+ }
+ }
+ return;
+diff -Nur ../wcstools-3.7.0.orig/delhead.c ./delhead.c
+--- ../wcstools-3.7.0.orig/delhead.c 2007-09-11 11:16:02.899153988 +0100
++++ ./delhead.c 2007-09-11 11:16:23.702487608 +0100
+@@ -551,7 +551,7 @@
+ char *header; /* FITS header */
+ int verbose; /* If true, print deletion confirmations */
+ {
+- char *hplace, *hcom, *v, *v1, *v2, *ve;
++ char *hplace, *hcom, *v, *v2, *ve;
+ int i, killcom, nline;
+ int nkill = 0;
+
+@@ -585,7 +585,7 @@
+
+ /* Fill line with blanks */
+ else {
+- for (i = 0; i++; i < 80)
++ for (i = 0; i < 80; i++)
+ hcom[i] = ' ';
+ hplace = hplace + 80;
+ }
+diff -Nur ../wcstools-3.7.0.orig/delwcs.c ./delwcs.c
+--- ../wcstools-3.7.0.orig/delwcs.c 2007-09-11 11:16:02.899153988 +0100
++++ ./delwcs.c 2007-09-11 11:16:23.722478748 +0100
+@@ -114,7 +114,7 @@
+
+ {
+ char *header; /* FITS image header */
+- char *image; /* Image pixels */
++ char *image = NULL; /* Image pixels */
+ int lhead; /* Maximum number of bytes in FITS header */
+ int nbhead; /* Actual number of bytes in FITS header */
+ int iraffile; /* 1 if IRAF image */
+diff -Nur ../wcstools-3.7.0.orig/edhead.c ./edhead.c
+--- ../wcstools-3.7.0.orig/edhead.c 2007-09-11 11:16:02.899153988 +0100
++++ ./edhead.c 2007-09-11 11:16:23.762461027 +0100
+@@ -210,8 +210,8 @@
+ break;
+ }
+ nbytes = i + 1;
+- (void) fwrite (headline, 1, nbytes, fd);
+- (void) fwrite (newline, 1, 1, fd);
++ fwrite (headline, 1, nbytes, fd);
++ fwrite (newline, 1, 1, fd);
+ }
+ fclose (fd);
+ free (header);
+diff -Nur ../wcstools-3.7.0.orig/filename.c ./filename.c
+--- ../wcstools-3.7.0.orig/filename.c 2007-09-11 11:16:02.899153988 +0100
++++ ./filename.c 2007-09-11 11:16:23.786450395 +0100
+@@ -39,7 +39,7 @@
+ {
+ char *fn, *fn0;
+ char *str;
+- char *name;
++ char *name = NULL;
+ char *is[10];
+ char *endroot;
+ int i, n;
+diff -Nur ../wcstools-3.7.0.orig/getcol.c ./getcol.c
+--- ../wcstools-3.7.0.orig/getcol.c 2007-09-11 11:16:02.923155356 +0100
++++ ./getcol.c 2007-09-11 11:16:23.810439763 +0100
+@@ -447,7 +447,7 @@
+ nop++;
+ }
+ else
+- printf (" Constants %s, %s, or operation %s illegal\n",sop1,sop2,opi[0]);
++ printf (" Constants %s, %s, or operation %c illegal\n",sop1,sop2,opi[0]);
+ }
+
+ /* File to read */
+diff -Nur ../wcstools-3.7.0.orig/getdate.c ./getdate.c
+--- ../wcstools-3.7.0.orig/getdate.c 2007-09-11 11:16:02.923155356 +0100
++++ ./getdate.c 2007-09-11 11:16:23.830430903 +0100
+@@ -409,10 +409,10 @@
+ int year, vyear;
+ int lfd, oldfits;
+ char outform[16];
+- char *fitsdate, *newfdate, *stdate;
++ char *fitsdate = NULL, *newfdate, *stdate;
+ char temp[64];
+ char fyear[16];
+- char ts0[8];
++ char ts0[9];
+ char *tchar;
+ int its, its1;
+ time_t lts;
+diff -Nur ../wcstools-3.7.0.orig/getpix.c ./getpix.c
+--- ../wcstools-3.7.0.orig/getpix.c 2007-09-11 11:16:02.923155356 +0100
++++ ./getpix.c 2007-09-11 11:16:23.846423815 +0100
+@@ -68,7 +68,7 @@
+ char *fn;
+ char *rrange; /* Row range string */
+ char *crange; /* Column range string */
+- char *rstr;
++ char *rstr = NULL;
+ char *dstr = NULL;
+ char *cstr;
+ int systemp;
+diff -Nur ../wcstools-3.7.0.orig/gettab.c ./gettab.c
+--- ../wcstools-3.7.0.orig/gettab.c 2007-09-11 11:16:02.923155356 +0100
++++ ./gettab.c 2007-09-11 11:16:23.862416727 +0100
+@@ -558,7 +558,7 @@
+ char *alias[]; /* Output names of keywords if different from input */
+
+ {
+- char *str;
++ char *str = NULL;
+ char *cstr, *cval, cvalue[64];
+ int pass = 0;
+ int drop;
+diff -Nur ../wcstools-3.7.0.orig/imcat.c ./imcat.c
+--- ../wcstools-3.7.0.orig/imcat.c 2007-09-11 11:16:02.975158319 +0100
++++ ./imcat.c 2007-09-11 11:16:23.886406094 +0100
+@@ -109,9 +109,6 @@
+ char **fn;
+ int i, ic;
+ int nx, ny;
+- char *header;
+- double cra, cdec, dra, ddec, secpix;
+- int wp, hp, bitpix;
+ double x, y;
+ char *refcatname[5]; /* reference catalog name */
+ int ncat = 0;
+@@ -123,7 +120,7 @@
+ int scat = 0;
+ char c1, c, *ccom;
+ double drot;
+- struct WorldCoor *wcs = NULL; /* World coordinate system structure */
++ /*struct WorldCoor *wcs = NULL;*/ /* World coordinate system structure */
+
+ nfile = 0;
+ fn = (char **)calloc (maxnfile, sizeof(char *));
+@@ -1777,7 +1774,7 @@
+ sprintf (headline, "%s %s %s %5.1f %5.1f %d",
+ numstr,rastr,decstr,gm[0][i],gm[1][i],gc[i]);
+ else if (refcat == SKYBOT)
+- sprintf (headline, "%s %s %s %5.2f %5.2f %5.2f",
++ sprintf (headline, "%s %s %s %5.2f %5.2f %5.2f %5.2f",
+ numstr,rastr,decstr,gm[0][i],gm[1][i],gm[2][i],gm[3][i]);
+ else if (refcat == UJC)
+ sprintf (headline, "%s %s %s %5.2f %d",
+diff -Nur ../wcstools-3.7.0.orig/imfill.c ./imfill.c
+--- ../wcstools-3.7.0.orig/imfill.c 2007-09-11 11:16:02.975158319 +0100
++++ ./imfill.c 2007-09-11 11:16:23.914393690 +0100
+@@ -313,7 +313,7 @@
+ int nfilled;
+ int nbadpix;
+ int i;
+- char *irafheader; /* IRAF image header */
++ char *irafheader = NULL; /* IRAF image header */
+ char newname[256]; /* Name for revised image */
+ char *ltime;
+ char *endchar;
+diff -Nur ../wcstools-3.7.0.orig/imsmooth.c ./imsmooth.c
+--- ../wcstools-3.7.0.orig/imsmooth.c 2007-09-11 11:16:02.999159687 +0100
++++ ./imsmooth.c 2007-09-11 11:16:23.946379514 +0100
+@@ -263,7 +263,7 @@
+ char *ext = NULL;
+ char *newimage = NULL;
+ char *imext = NULL;
+- char *imext1;
++ char *imext1 = NULL;
+ char *fname;
+ char extname[16];
+ int lext = 0;
+diff -Nur ../wcstools-3.7.0.orig/imstack.c ./imstack.c
+--- ../wcstools-3.7.0.orig/imstack.c 2007-09-11 11:16:02.999159687 +0100
++++ ./imstack.c 2007-09-11 11:16:23.946379514 +0100
+@@ -194,7 +194,7 @@
+ blanks = (char *) malloc ((size_t) nbytes);
+ for (i = 0; i < nbytes; i++)
+ blanks[i] = 0;
+- (void) fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack);
++ fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack);
+ free (blanks);
+ }
+ }
+@@ -449,7 +449,7 @@
+ blanks = (char *) malloc ((size_t) nbytes);
+ for (i = 0; i < nbytes; i++)
+ blanks[i] = 0;
+- (void) fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack);
++ fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack);
+ free (blanks);
+ }
+ }
+diff -Nur ../wcstools-3.7.0.orig/libwcs/binread.c ./libwcs/binread.c
+--- ../wcstools-3.7.0.orig/libwcs/binread.c 2007-09-11 11:16:02.771146693 +0100
++++ ./libwcs/binread.c 2007-09-11 11:16:23.970368881 +0100
+@@ -505,7 +505,7 @@
+ struct Star *star;
+ char str[128];
+ int nmag;
+- int mrv;
++ int mrv = 0;
+
+ nstar = 0;
+ starcat = binopen (bincat);
+@@ -694,7 +694,7 @@
+ int nmag; /* Real number of magnitudes per entry (- rv) */
+ int jstar;
+ int nstar;
+- double mag;
++ double mag = 0;
+ double num;
+ int magsort;
+ int istar = 0;
+@@ -1372,7 +1372,7 @@
+ for (i = 0; i < nmag; i++) {
+ moveb (sc->catline, (char *) st->mag, 2, sc->entmag[0]+(i*2), i*2);
+ if (sc->byteswapped)
+- binswap2 (&st->mag[i], 2);
++ binswap2 ((char*)&st->mag[i], 2);
+ st->xmag[i] = 0.01 * (double) st->mag[i];
+ }
+ }
+diff -Nur ../wcstools-3.7.0.orig/libwcs/catutil.c ./libwcs/catutil.c
+--- ../wcstools-3.7.0.orig/libwcs/catutil.c 2007-09-11 11:16:02.771146693 +0100
++++ ./libwcs/catutil.c 2007-09-11 11:16:23.994358249 +0100
+@@ -737,7 +737,7 @@
+ lname = 0;
+ else
+ lname = strlen (refcatname);
+- catname = (char *)calloc (lname + 16, 1);
++ catname = (char *)calloc (lname + 37, 1);
+ if (lname > 0)
+ sprintf (catname, "%s sources", refcatname);
+ else
+diff -Nur ../wcstools-3.7.0.orig/libwcs/fileutil.c ./libwcs/fileutil.c
+--- ../wcstools-3.7.0.orig/libwcs/fileutil.c 2007-09-11 11:16:02.771146693 +0100
++++ ./libwcs/fileutil.c 2007-09-11 11:16:24.010351161 +0100
+@@ -343,7 +343,7 @@
+ /* If line can be read, add null at the end of the first token */
+ if (fgets (token, ncmax, diskfile) != NULL) {
+ if (token[0] == '#') {
+- (void) fgets (token, ncmax, diskfile);
++ fgets (token, ncmax, diskfile);
+ }
+
+ /* If only character is a control character, return a NULL */
+diff -Nur ../wcstools-3.7.0.orig/libwcs/findstar.c ./libwcs/findstar.c
+--- ../wcstools-3.7.0.orig/libwcs/findstar.c 2007-09-11 11:16:02.771146693 +0100
++++ ./libwcs/findstar.c 2007-09-11 11:16:24.038338757 +0100
+@@ -747,7 +747,7 @@
+ double sd = 0.0;
+ int i;
+ int npix;
+- double dnpix;
++ double dnpix = 0;
+ double sum;
+
+ pmin = -1.0e20;
+diff -Nur ../wcstools-3.7.0.orig/libwcs/fitsfile.c ./libwcs/fitsfile.c
+--- ../wcstools-3.7.0.orig/libwcs/fitsfile.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/fitsfile.c 2007-09-11 11:16:24.062328125 +0100
+@@ -874,7 +874,7 @@
+ if (!simple) {
+ nbytes = getfilesize (filename) - nbhead;
+ if ((image = (char *) malloc (nbytes + 1)) == NULL) {
+- snprintf (fitserrmsg,79, "FITSRFULL: %d-byte image buffer cannot be allocated\n");
++ snprintf (fitserrmsg,79, "FITSRFULL: %d-byte image buffer cannot be allocated\n", nbytes);
+ (void)close (fd);
+ return (NULL);
+ }
+diff -Nur ../wcstools-3.7.0.orig/libwcs/gsc2read.c ./libwcs/gsc2read.c
+--- ../wcstools-3.7.0.orig/libwcs/gsc2read.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/gsc2read.c 2007-09-11 11:16:24.086317492 +0100
+@@ -191,7 +191,7 @@
+
+ /* Dump returned file and stop */
+ if (nlog < 0) {
+- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout);
++ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout);
+ exit (0);
+ }
+
+@@ -293,7 +293,7 @@
+ char *databuff;
+ char *lastbuff;
+ char *oldbuff;
+- char *colhead, *colsep;
++ /*char *colhead, *colsep;*/
+ int lhead, lbuff, i, j;
+ char ctab = (char) 9;
+ char ccom = ',';
+diff -Nur ../wcstools-3.7.0.orig/libwcs/gscread.c ./libwcs/gscread.c
+--- ../wcstools-3.7.0.orig/libwcs/gscread.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/gscread.c 2007-09-11 11:16:24.114305088 +0100
+@@ -512,7 +512,7 @@
+ }
+
+ /* Close region input file */
+- (void) close (ift);
++ close (ift);
+ itot = itot + itable;
+ if (nlog > 0)
+ fprintf (stderr,"GSCREAD: %4d / %4d: %5d / %5d / %5d sources from region %4d \n",
+@@ -549,7 +549,7 @@
+ int *gtype; /* Array of object types (returned) */
+ int nlog; /* 1 for diagnostics */
+ {
+- char *table; /* FITS table */
++ char *table = NULL; /* FITS table */
+ char inpath[64]; /* Pathname for input FITS table file */
+ char entry[100]; /* Buffer for FITS table row */
+ int class; /* Object class (0>star, 3>other) */
+@@ -574,7 +574,7 @@
+ double perr0 = 0.0;
+ double ra0 = 0.0;
+ double dec0 = 0.0;
+- char *str;
++ char *str = NULL;
+ char *url;
+
+ itot = 0;
+@@ -756,7 +756,7 @@
+ }
+
+ /* Close region input file */
+- (void) close (ift);
++ close (ift);
+ itot = itot + itable;
+ if (nlog > 0)
+ fprintf (stderr,"GSCRNUM: %4d / %4d: %5d / %5d sources, region %4d.%04d\n",
+@@ -795,7 +795,7 @@
+ int rlist[100]; /* List of input FITS tables files */
+ char inpath[64]; /* Pathname for input FITS table file */
+ char entry[100]; /* Buffer for FITS table row */
+- int class, class0; /* Object class (0>star, 3>other) */
++ int class = 0, class0 = 0; /* Object class (0>star, 3>other) */
+ int sysref=WCS_J2000; /* Catalog coordinate system */
+ double eqref=2000.0; /* Catalog equinox */
+ struct Keyword kw[8]; /* Keyword structure */
+@@ -808,9 +808,9 @@
+ int ik,nk,itable,ntable,jstar;
+ int nbline,npos,nbhead;
+ int nbr,nrmax,nstar,i;
+- int ift, band0, band;
+- double ra,ra0,rasum,dec,dec0,decsum,perr,perr0,perr2,perrsum,msum;
+- double mag,mag0,merr,merr0,merr2,merrsum;
++ int ift, band0 = 0., band = 0.;
++ double ra,ra0 = 0.,rasum,dec,dec0 = 0.,decsum,perr,perr0 = 0.,perr2,perrsum,msum;
++ double mag,mag0 = 0.,merr,merr0 = 0.,merr2,merrsum;
+ double rra1, rra2, rdec1, rdec2;
+ double rdist, ddist;
+ char *str;
+@@ -830,11 +830,11 @@
+
+ /* Set image parameters */
+ bitpix = 0;
+- (void)hgeti4 (header, "BITPIX", &bitpix);
++ hgeti4 (header, "BITPIX", &bitpix);
+ w = 0;
+- (void)hgeti4 (header, "NAXIS1", &w);
++ hgeti4 (header, "NAXIS1", &w);
+ h = 0;
+- (void)hgeti4 (header, "NAXIS2", &h);
++ hgeti4 (header, "NAXIS2", &h);
+
+ if (refcat == GSCACT) {
+ if ((str = getenv("GSCACT_NORTH")) == NULL)
+@@ -1080,7 +1080,7 @@
+ }
+
+ /* Close region input file */
+- (void) close (ift);
++ close (ift);
+ itot = itot + itable;
+ if (nlog > 0)
+ fprintf (stderr,"GSCBIN: %4d / %4d: %5d / %5d / %5d sources from region %4d \n",
+@@ -1321,7 +1321,7 @@
+ jr2 = 0;
+ }
+
+- (void) close (ift);
++ close (ift);
+ return (nrgn);
+ }
+
+@@ -1381,7 +1381,7 @@
+ double min; /* Minutes of declination */
+
+ /* Get declination sign from table */
+- (void) ftgetc (fitsline, &rkw[sgncol], sgn, 3);
++ ftgetc (fitsline, &rkw[sgncol], sgn, 3);
+
+ /* Get degrees of declination from table */
+ deg = ftgetr8 (fitsline, &rkw[dcol]);
+diff -Nur ../wcstools-3.7.0.orig/libwcs/hput.c ./libwcs/hput.c
+--- ../wcstools-3.7.0.orig/libwcs/hput.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/hput.c 2007-09-11 11:16:24.142292684 +0100
+@@ -273,7 +273,7 @@
+ const char *cval; /* character string containing the value for variable
+ keyword. trailing and leading blanks are removed. */
+ {
+- int lroot, lcv, i, ii, nkw, lkw, lval;
++ int lroot = 0, lcv, i, ii, nkw, lkw, lval;
+ int comment = 0;
+ const char *v;
+ char keyroot[8], newkey[12], value[80];
+@@ -599,7 +599,7 @@
+ char squot, slash, space;
+ char line[100];
+ int lkeyword, lcom, lhead, i, lblank, ln, nc, lc;
+- char *vp, *v1, *v2, *c0, *c1, *q1, *q2;
++ char *vp, *v1, *v2, *c0, *c1, *q1, *q2=NULL;
+
+ squot = (char) 39;
+ slash = (char) 47;
+diff -Nur ../wcstools-3.7.0.orig/libwcs/imgetwcs.c ./libwcs/imgetwcs.c
+--- ../wcstools-3.7.0.orig/libwcs/imgetwcs.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/imgetwcs.c 2007-09-11 11:16:24.158285596 +0100
+@@ -381,7 +381,7 @@
+ double xref, yref, degpix, secpix;
+ struct WorldCoor *wcs;
+ char temp[16];
+- char *cwcs;
++ char *cwcs = NULL;
+
+ /* Set the world coordinate system from the image header */
+ if (strlen (filename) > 0) {
+diff -Nur ../wcstools-3.7.0.orig/libwcs/imhfile.c ./libwcs/imhfile.c
+--- ../wcstools-3.7.0.orig/libwcs/imhfile.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/imhfile.c 2007-09-11 11:16:24.174278507 +0100
+@@ -910,10 +910,10 @@
+
+ /* Write IRAF header to disk file */
+ nbw = write (fd, irafheader, nbhead);
+- (void) ftruncate (fd, nbhead);
++ ftruncate (fd, nbhead);
+ close (fd);
+ if (nbw < nbhead) {
+- (void)fprintf(stderr, "IRAF header file %s: %d / %d bytes written.\n",
++ fprintf(stderr, "IRAF header file %s: %d / %d bytes written.\n",
+ hdrname, nbw, nbhead);
+ return (-1);
+ }
+diff -Nur ../wcstools-3.7.0.orig/libwcs/imrotate.c ./libwcs/imrotate.c
+--- ../wcstools-3.7.0.orig/libwcs/imrotate.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/imrotate.c 2007-09-11 11:16:24.190271419 +0100
+@@ -371,7 +371,6 @@
+
+ {
+ static char flds[15][8];
+- char ctype1[16], ctype2[16];
+ double ctemp1, ctemp2, ctemp3, ctemp4, naxis1, naxis2;
+ int i, n, ndec1, ndec2, ndec3, ndec4;
+
+diff -Nur ../wcstools-3.7.0.orig/libwcs/imsetwcs.c ./libwcs/imsetwcs.c
+--- ../wcstools-3.7.0.orig/libwcs/imsetwcs.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/imsetwcs.c 2007-09-11 11:16:24.206264331 +0100
+@@ -136,22 +136,22 @@
+ int nmax; /* Maximum number of matches possible (nrg or nbs) */
+ int lofld = 0; /* Length of object name field in output */
+ double mag1,mag2;
+- int refcat; /* reference catalog switch */
++ int refcat = 0; /* reference catalog switch */
+ int nmag, mprop;
+ double dxys;
+ char numstr[32];
+ int minstars;
+- int ngmax;
++ int ngmax = 0;
+ int nbin, nbytes;
+ int iterate, toliterate, nfiterate;
+- int imag, magsort;
++ int imag, magsort = 0;
+ int niter = 0;
+ int recenter = recenter0;
+ int ret = 0;
+ int is, ig, igs, i, j;
+ char rstr[32], dstr[32];
+ double refeq, refep;
+- double maxnum;
++ double maxnum = 0;
+ int nnfld;
+ int refsys;
+ char refcoor[8];
+diff -Nur ../wcstools-3.7.0.orig/libwcs/imutil.c ./libwcs/imutil.c
+--- ../wcstools-3.7.0.orig/libwcs/imutil.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/imutil.c 2007-09-11 11:16:24.226255471 +0100
+@@ -164,7 +164,7 @@
+ {
+ char *buffret; /* Modified image buffer (returned) */
+ int nx,ny; /* Number of columns and rows in image */
+-int ix,iy; /* Pixel around which to compute mean */
++int ix,iy = 0; /* Pixel around which to compute mean */
+ int npix; /* Number of pixels in image */
+ int bitpix; /* Number of bits per pixel (<0=floating point) */
+ int bitpixb; /* Number of bits per pixel in bad pixel file */
+@@ -217,7 +217,7 @@
+ if (*bb++) {
+ *b2++ = bpvali2;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -236,7 +236,7 @@
+ if (*bb++) {
+ *b2++ = bpvali2;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -263,7 +263,7 @@
+ if (*bb++) {
+ *b2++ = bpvali4;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -282,7 +282,7 @@
+ if (*bb++) {
+ *b2++ = bpvali4;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -310,7 +310,7 @@
+ if (*bb++) {
+ *b2++ = bpvalr4;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -329,7 +329,7 @@
+ if (*bb++) {
+ *b2++ = bpvalr4;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -355,7 +355,7 @@
+ if (*bb++) {
+ *b2++ = bpval;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -374,7 +374,7 @@
+ if (*bb++) {
+ *b2++ = bpval;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -407,7 +407,7 @@
+ {
+ char *buffret; /* Modified image buffer (returned) */
+ int nx,ny; /* Number of columns and rows in image */
+-int ix,iy; /* Pixel around which to compute mean */
++int ix,iy = 0; /* Pixel around which to compute mean */
+ int npix; /* Number of pixels in image */
+ int bitpix; /* Number of bits per pixel (<0=floating point) */
+ int checkmin = 0;
+@@ -450,12 +450,12 @@
+ if (checkmin && *bb < mnvali2) {
+ *b2++ = bpvali2;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else if (checkmax && *bb > mxvali2) {
+ *b2++ = bpvali2;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -482,12 +482,12 @@
+ if (checkmin && *bb < mnvali4) {
+ *b2++ = bpvali4;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else if (checkmax && *bb > mxvali4) {
+ *b2++ = bpvali4;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -514,12 +514,12 @@
+ if (checkmin && *bb < mnvalr4) {
+ *b2++ = bpvalr4;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else if (checkmax && *bb > mxvalr4) {
+ *b2++ = bpvalr4;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -546,12 +546,12 @@
+ if (checkmin && *bb < mnvalr8) {
+ *b2++ = bpvalr8;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else if (checkmax && *bb > mxvalr8) {
+ *b2++ = bpvalr8;
+ nfilled++;
+- *b1++;
++ b1++;
+ }
+ else {
+ *b2++ = *b1++;
+@@ -589,7 +589,7 @@
+ {
+ char *buffret; /* Modified image buffer (returned) */
+ int nx,ny; /* Number of columns and rows in image */
+-int ix,iy; /* Pixel around which to compute median */
++int ix,iy = 0; /* Pixel around which to compute median */
+ int npix; /* Number of pixels in image */
+ int bitpix; /* Number of bits per pixel (<0=floating point) */
+ int naxes;
+@@ -698,7 +698,7 @@
+ {
+ char *buffret; /* Modified image buffer (returned) */
+ int nx,ny; /* Number of columns and rows in image */
+-int ix,iy; /* Pixel around which to compute median */
++int ix,iy = 0; /* Pixel around which to compute median */
+ int npix; /* Number of pixels in image */
+ int bitpix; /* Number of bits per pixel (<0=floating point) */
+ int naxes;
+@@ -1173,7 +1173,7 @@
+ {
+ char *buffret; /* Modified image buffer (returned) */
+ int nx,ny; /* Number of columns and rows in image */
+-int ix,iy; /* Pixel around which to compute mean */
++int ix,iy = 0; /* Pixel around which to compute mean */
+ int npix; /* Number of pixels in image */
+ int bitpix; /* Number of bits per pixel (<0=floating point) */
+ int naxes;
+@@ -1278,7 +1278,7 @@
+ {
+ char *buffret; /* Modified image buffer (returned) */
+ int nx,ny; /* Number of columns and rows in image */
+-int ix,iy; /* Pixel around which to compute mean */
++int ix,iy = 0; /* Pixel around which to compute mean */
+ int npix; /* Number of pixels in image */
+ int bitpix; /* Number of bits per pixel (<0=floating point) */
+ int naxes;
+@@ -1651,7 +1651,7 @@
+ {
+ char *buffret; /* Modified image buffer (returned) */
+ int nx,ny; /* Number of columns and rows in image */
+- int ix,iy; /* Pixel around which to compute median */
++ int ix,iy = 0; /* Pixel around which to compute median */
+ int npix; /* Number of pixels in image */
+ int bitpix; /* Number of bits per pixel (<0=floating point) */
+ int naxes;
+@@ -1752,7 +1752,7 @@
+ {
+ char *buffret; /* Modified image buffer (returned) */
+ int nx,ny; /* Number of columns and rows in image */
+-int ix,iy; /* Pixel around which to compute median */
++int ix,iy = 0; /* Pixel around which to compute median */
+ int npix; /* Number of pixels in image */
+ int bitpix; /* Number of bits per pixel (<0=floating point) */
+ int naxes;
+diff -Nur ../wcstools-3.7.0.orig/libwcs/proj.c ./libwcs/proj.c
+--- ../wcstools-3.7.0.orig/libwcs/proj.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/proj.c 2007-09-11 11:16:24.242248383 +0100
+@@ -3672,7 +3672,7 @@
+
+ {
+ int face;
+- double cthe, eta, l, m, n, rho, xi;
++ double cthe, eta = 0, l, m, n, rho, xi = 0;
+ const float tol = 1.0e-7;
+
+ float a, a2, a2b2, a4, ab, b, b2, b4, ca2, cb2;
+diff -Nur ../wcstools-3.7.0.orig/libwcs/sdssread.c ./libwcs/sdssread.c
+--- ../wcstools-3.7.0.orig/libwcs/sdssread.c 2007-09-11 11:16:02.775146921 +0100
++++ ./libwcs/sdssread.c 2007-09-11 11:16:24.258241295 +0100
+@@ -165,7 +165,7 @@
+
+ /* Dump returned file and stop */
+ if (nlog < 0) {
+- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout);
++ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout);
+ exit (0);
+ }
+
+diff -Nur ../wcstools-3.7.0.orig/libwcs/skybotread.c ./libwcs/skybotread.c
+--- ../wcstools-3.7.0.orig/libwcs/skybotread.c 2007-09-11 11:16:02.783147377 +0100
++++ ./libwcs/skybotread.c 2007-09-11 11:16:24.286228890 +0100
+@@ -125,12 +125,11 @@
+ int nlog; /* 1 for diagnostics */
+ {
+ char srchurl[LINE];
+- char cmag;
+ char *obs;
+ char *dstr;
+ struct TabTable *tabtable;
+ struct StarCat *starcat; /* Star catalog data structure */
+- double dtemp, jdout;
++ double jdout;
+ int nstar, nlog0;
+ double ra, dec, mag, dradi, dradx;
+ char rastr[32], decstr[32], temp[256], tstr[80];
+@@ -281,29 +280,22 @@
+
+ char *skybuff; /* Input comma-separated table */
+ {
+- char *heading;
+ char *colhead;
+ char *colsep;
+ char *tabbuff; /* Output tab-separated table */
+ char *tbuff;
+- char *databuff;
+ char *dbuff;
+ char *buffer;
+ char *lastbuff;
+- char *endhead;
+ char *colend;
+- char *chead;
+- char *head;
+ char *tbuffi;
+ char temp[16], format[16];
+ int lbuff, i, lra, icol;
+- int lhead, ldata;
++ int lhead;
+ int addname;
+ int lobj;
+ char cbuff;
+- char *buff;
+ char cbar = '|';
+- char ccom = ',';
+ char cminus = '-';
+ char cspace = ' ';
+ char ctab = (char) 9;
+diff -Nur ../wcstools-3.7.0.orig/libwcs/tabread.c ./libwcs/tabread.c
+--- ../wcstools-3.7.0.orig/libwcs/tabread.c 2007-09-11 11:16:02.779147149 +0100
++++ ./libwcs/tabread.c 2007-09-11 11:16:24.306220030 +0100
+@@ -147,7 +147,7 @@
+ int lname;
+ int imag;
+ double ra,dec, rapm, decpm;
+- double mag, parallax, rv;
++ double mag = 0, parallax, rv;
+ double num;
+ int peak, i;
+ int istar, nstars, lstar;
+@@ -596,7 +596,7 @@
+ }
+
+ /* Check ID number first */
+- (void) setoken (&startok, line, "tab");
++ setoken (&startok, line, "tab");
+ if (!strcmp (sc->isfil,"gsc-server")) {
+ if (tabgetc (&startok, sc->entid, str, 24))
+ num = 0.0;
+@@ -782,7 +782,7 @@
+ int nstar;
+ int imag;
+ double ra,dec, rapm, decpm;
+- double mag, parallax, rv;
++ double mag = 0, parallax, rv;
+ double num;
+ int peak;
+ int istar, nstars, lstar;
+@@ -2163,7 +2163,7 @@
+ tabtable->lline = (nextline - tabtable->tabdata) * 2;
+ tabtable->tabline = (char *) calloc (tabtable->lline, 1);
+ fseek (tabtable->tcat, (long) tabtable->lhead, SEEK_SET);
+- (void) fgets (tabtable->tabline, tabtable->lline, tabtable->tcat);
++ fgets (tabtable->tabline, tabtable->lline, tabtable->tcat);
+ lline = strlen (tabtable->tabline);
+ if (tabtable->tabline[lline-1] < 32)
+ tabtable->tabline[lline-1] = (char) 0;
+@@ -2173,7 +2173,7 @@
+ /* Close catalog file if not reading one line at a time */
+ else {
+ tabtable->lhead = 0;
+- (void) fclose (fcat);
++ fclose (fcat);
+ tabtable->tcat = NULL;
+ }
+
+@@ -2245,7 +2245,7 @@
+ fseek (tabtable->tcat, (long) tabtable->lhead, SEEK_SET);
+ tabtable->iline = 0;
+ for (i = tabtable->iline; i < iline; i++) {
+- (void) fgets (tabtable->tabline, tabtable->lline, tabtable->tcat);
++ fgets (tabtable->tabline, tabtable->lline, tabtable->tcat);
+ tabtable->iline++;
+ }
+ lline = strlen (tabtable->tabline);
+@@ -2648,7 +2648,6 @@
+ return (0);
+ }
+
+-
+ /* Search table of column headings for first with string (case-independent) */
+
+ static int
+diff -Nur ../wcstools-3.7.0.orig/libwcs/tmcread.c ./libwcs/tmcread.c
+--- ../wcstools-3.7.0.orig/libwcs/tmcread.c 2007-09-11 11:16:02.779147149 +0100
++++ ./libwcs/tmcread.c 2007-09-11 11:16:24.314216486 +0100
+@@ -105,7 +105,7 @@
+ double eqref=2000.0; /* Catalog equinox */
+ double epref=2000.0; /* Catalog epoch */
+ double size = 0.0; /* Semi-major axis of extended source */
+- struct StarCat *starcat;
++ struct StarCat *starcat = NULL;
+ struct Star *star;
+ int verbose;
+ int wrap;
+@@ -529,7 +529,7 @@
+ int sysref=WCS_J2000; /* Catalog coordinate system */
+ double eqref=2000.0; /* Catalog equinox */
+ double epref=2000.0; /* Catalog epoch */
+- struct StarCat *starcat;
++ struct StarCat *starcat = NULL;
+ struct Star *star;
+ char *str;
+
+diff -Nur ../wcstools-3.7.0.orig/libwcs/wcs.c ./libwcs/wcs.c
+--- ../wcstools-3.7.0.orig/libwcs/wcs.c 2007-09-11 11:16:02.779147149 +0100
++++ ./libwcs/wcs.c 2007-09-11 11:16:24.326211170 +0100
+@@ -1415,8 +1415,8 @@
+ double x2,y2; /* (RA,Dec) or (Long,Lat) in degrees */
+
+ {
+- double xr1, xr2, yr1, yr2, r, diffi;
+- double pos1[3], pos2[3], w, diff, cosb;
++ double diffi, r;
++ double pos1[3], pos2[3], w, diff;
+ int i;
+
+ /* Convert two vectors to direction cosines */
+diff -Nur ../wcstools-3.7.0.orig/libwcs/wcsinit.c ./libwcs/wcsinit.c
+--- ../wcstools-3.7.0.orig/libwcs/wcsinit.c 2007-09-11 11:16:02.779147149 +0100
++++ ./libwcs/wcsinit.c 2007-09-11 11:16:24.334207626 +0100
+@@ -1082,7 +1082,7 @@
+ static void
+ wcseq (hstring, wcs)
+
+-char *hstring; /* character string containing FITS header information
++const char *hstring; /* character string containing FITS header information
+ in the format <keyword>= <value> [/ <comment>] */
+ struct WorldCoor *wcs; /* World coordinate system data structure */
+ {
+diff -Nur ../wcstools-3.7.0.orig/libwcs/webread.c ./libwcs/webread.c
+--- ../wcstools-3.7.0.orig/libwcs/webread.c 2007-09-11 11:16:02.779147149 +0100
++++ ./libwcs/webread.c 2007-09-11 11:16:24.342204082 +0100
+@@ -252,7 +252,7 @@
+
+ /* Dump returned file and stop */
+ if (nlog < 0) {
+- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout);
++ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout);
+ exit (0);
+ }
+
+@@ -378,7 +378,7 @@
+
+ /* Dump returned file and stop */
+ if (nlog < 0) {
+- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout);
++ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout);
+ exit (0);
+ }
+
+@@ -612,7 +612,7 @@
+ fflush(sok);
+ free (server);
+
+- (void) fscanf(sok, "%*s %d %*s\r\n", &status);
++ fscanf(sok, "%*s %d %*s\r\n", &status);
+
+ /* Skip continue lines
+ if (status == 100) {
+@@ -647,7 +647,7 @@
+ *lbuff = 0;
+ ltbuff = 0;
+ while (lline > 0) {
+- (void) fgets (linebuff, LINE, sok);
++ fgets (linebuff, LINE, sok);
+ lline = strlen (linebuff);
+ if (lline < 1)
+ break;
+@@ -689,7 +689,7 @@
+ else {
+ buff = tabbuff + lcbuff;
+ }
+- (void) fread (buff, 1, lchunk, sok);
++ fread (buff, 1, lchunk, sok);
+ buff[lchunk] = (char) 0;
+ if (diag)
+ fprintf (stderr, "%s\n", buff);
+@@ -730,7 +730,7 @@
+ fprintf (stderr, "%s\n", buff);
+ }
+ }
+- (void) fclose (sok);
++ fclose (sok);
+
+ return (tabbuff);
+ }
+@@ -864,7 +864,7 @@
+ space2tab (tabbuff)
+ char *tabbuff; /* Tab table filled with spaces */
+ {
+- char *newbuff, *line0, *line1, *ic, *icn, *tstart;
++ char *newbuff, *line0, *line1, *ic, *icn;
+ char cspace, ctab, cdash;
+ int lbuff;
+ int alltab = 0;
+diff -Nur ../wcstools-3.7.0.orig/scat.c ./scat.c
+--- ../wcstools-3.7.0.orig/scat.c 2007-09-11 11:16:03.023161055 +0100
++++ ./scat.c 2007-09-11 11:16:24.378188133 +0100
+@@ -1101,7 +1101,7 @@
+ double crao, cdeco; /* Output center long/lat or RA/Dec in degrees */
+ double epout = 0.0;
+ int ng; /* Number of catalog stars */
+- int ns; /* Number of brightest catalog stars actually used */
++ int ns = 0; /* Number of brightest catalog stars actually used */
+ struct Range *range = NULL; /* Range of catalog numbers to list */
+ int nfind; /* Number of stars to find */
+ int i, is, j, ngmax, nc;
+@@ -1122,7 +1122,7 @@
+ int nlog;
+ int magsort;
+ int typecol;
+- int band;
++ int band = 0;
+ int imag, nmagr;
+ int sysout = 0;
+ char sortletter = (char) 0;
+@@ -2366,7 +2366,7 @@
+ printf (" %5.2f %5.2f %5.2f %5.2f %5.2f",
+ gm[0][0],gm[1][0],gm[2][0],gm[4][0],gm[5][0]);
+ else
+- printf (" %5.2f %5.2f %5.2f %5.2f",
++ printf (" %5.2f %5.2f %5.2f %5.2f %5.2f",
+ gm[0][0],gm[1][0],gm[2][0],gm[4][0],gm[5][0]);
+ }
+ else if (refcat == HIP) {
+diff -Nur ../wcstools-3.7.0.orig/setpix.c ./setpix.c
+--- ../wcstools-3.7.0.orig/setpix.c 2007-09-11 11:16:03.023161055 +0100
++++ ./setpix.c 2007-09-11 11:16:24.390182817 +0100
+@@ -258,9 +258,9 @@
+ int lhead; /* Maximum number of bytes in FITS header */
+ int nbhead; /* Actual number of bytes in FITS header */
+ int iraffile; /* 1 if IRAF image */
+- char *irafheader; /* IRAF image header */
++ char *irafheader = NULL; /* IRAF image header */
+ int i, lext, lroot;
+- int nx, ny, ix, iy, x, y, ipix;
++ int nx, ny, ix, iy, x, y, ipix = 0;
+ char *imext, *imext1;
+ double bzero; /* Zero point for pixel scaling */
+ double bscale; /* Scale factor for pixel scaling */
+diff -Nur ../wcstools-3.7.0.orig/wcshead.c ./wcshead.c
+--- ../wcstools-3.7.0.orig/wcshead.c 2007-09-11 11:16:03.083164474 +0100
++++ ./wcshead.c 2007-09-11 11:16:24.398179273 +0100
+@@ -211,7 +211,7 @@
+ char *GetFITShead();
+ char rastr[32], decstr[32], fform[8];
+ struct WorldCoor *wcs, *GetWCSFITS();
+- double wfrst, dwl, wlast, dxpix, zvel, vel;
++ double wfrst, dwl, wlast, dxpix, zvel = 0, vel;
+ int logwav = 0;
+
+ if (rootdir){
+diff -Nur ../wcstools-3.7.0.orig/xy2sky.c ./xy2sky.c
+--- ../wcstools-3.7.0.orig/xy2sky.c 2007-09-11 11:16:03.083164474 +0100
++++ ./xy2sky.c 2007-09-11 11:16:24.398179273 +0100
+@@ -46,9 +46,9 @@
+ static int ncm = 0;
+ static int printhead = 0;
+ static char printonly = 'n';
+-static int centerset = 0;
++/*static int centerset = 0;
+ static int sizeset = 0;
+-static int scaleset = 0;
++static int scaleset = 0;*/
+ static int version = 0; /* If 1, print only program name and version */
+
+ static char *RevMsg = "XY2SKY WCSTools 3.7.0, 28 August 2007, Doug Mink (dmink@cfa.harvard.edu)";
+@@ -70,9 +70,9 @@
+ int entmag = 0;
+ int i, ic;
+ double x, y, mag;
+- double cra, cdec, dra, ddec, secpix, drot;
++ double cra, cdec, dra, ddec, secpix;/*, drot;*/
+ double eqout = 0.0;
+- double eqin = 0.0;
++ /*double eqin = 0.0;*/
+ int sysout = 0;
+ int wp, hp, nx, ny, lhead;
+ FILE *fd = NULL;
+@@ -82,7 +82,7 @@
+ char *header;
+ char *fn;
+ int bitpix = 0;
+- struct WorldCoor *wcs;
++ struct WorldCoor *wcs = NULL;
+ char xstr[32], ystr[32], mstr[32];
+ char rastr[32], decstr[32];
+ char keyword[16];
diff --git a/sci-astronomy/wcstools/wcstools-3.7.0.ebuild b/sci-astronomy/wcstools/wcstools-3.7.0.ebuild
new file mode 100644
index 000000000000..032d6028e4ad
--- /dev/null
+++ b/sci-astronomy/wcstools/wcstools-3.7.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/wcstools/wcstools-3.7.0.ebuild,v 1.1 2007/09/11 11:21:24 bicatali Exp $
+
+inherit eutils autotools
+
+DESCRIPTION="Astronomy Library to handle World Coordinate System for FITS images"
+HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools"
+SRC_URI="http://tdc-www.harvard.edu/software/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-fix-warnings.patch
+ epatch "${FILESDIR}"/${P}-fix-leaks.patch
+ epatch "${FILESDIR}"/${P}-autotools.patch
+ sed -i -e 's/3.7.x/${PV}/' configure.ac || die "sed failed"
+ eautoreconf
+}
+
+src_test() {
+ cd "${S}"
+ einfo "Testing various wcstools programs"
+ ./newfits -a 10 -j 248 41 -p 0.15 test.fits || die "test newfits failed"
+ ./sethead test.fits A=1 B=1 || die "test sethead failed"
+ [[ "$(./gethead test.fits RA)" == "16:32:00.000" ]] \
+ || die "test gethead failed"
+ rm -f test.fits
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ doman Man/man1/* || die "doman failed"
+ dodoc Readme Programs NEWS || die "dodoc failed"
+ newdoc libwcs/Readme Readme.libwcs || die "newdoc failed"
+ newdoc libwcs/NEWS NEWS.libwcs || die "newdoc failed"
+}