[eso-midas] 03/03: Two more (minor) bug/warning fixes
Ole Streicher
olebole at moszumanska.debian.org
Mon Mar 23 14:14:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
olebole pushed a commit to branch debian
in repository eso-midas.
commit babbd72c6ec0a796ebbe05c3cf7010843ba1a9b3
Author: Ole Streicher <debian at liska.ath.cx>
Date: Mon Mar 23 15:14:28 2015 +0100
Two more (minor) bug/warning fixes
---
debian/patches/fix_esoext_c.patch | 55 +++++++++++++++++++++++++++++++++++++++
debian/patches/fix_midfct_c.patch | 16 ++++++++++++
debian/patches/series | 2 ++
3 files changed, 73 insertions(+)
diff --git a/debian/patches/fix_esoext_c.patch b/debian/patches/fix_esoext_c.patch
new file mode 100644
index 0000000..dd5f76a
--- /dev/null
+++ b/debian/patches/fix_esoext_c.patch
@@ -0,0 +1,55 @@
+Author: Ole Streicher <olebole at debian.org>
+Description: Remove the unused "-t" option.
+ Code from this option causes a warning during compilation, and it is
+ not used anyway.
+--- a/system/ext/esoext.c
++++ b/system/ext/esoext.c
+@@ -78,7 +78,7 @@
+ char stmt[MXSTAT]; /* present statement */
+ char lbuf[MXLBUF][MXLINE]; /* buffer for input lines */
+ char u_text[] = /* usage text */
+- "usage: esoext [-csdnilxuv] [-f file] [-t table] [-I path]\n";
++ "usage: esoext [-csdnilxuv] [-f file] [-I path]\n";
+
+ int main(argc, argv)
+ int argc;
+@@ -86,7 +86,7 @@
+ {
+ int c, ns, n, i, stype, action, nip, line_type();
+ int hstat[MXFSTAT], put_line(), labno,chk_id();
+- char *f_name, *o_name, *table, *new_ext();
++ char *f_name, *o_name, *new_ext();
+ char *incl_path[MXINCP], *incl_name, *incl_file();
+ char *p,cont, *plab, label[6], get_line();
+ char *push_lab(), *pop_lab(), *new_file();
+@@ -98,7 +98,7 @@
+ for (n=0; n<MXINCP; n++) incl_path[n] = (char *) 0;
+
+ f_flag = 0; x_flag = 0; fp = (FILE *) 0;
+- f_name = (char *) 0; table = (char *) 0;
++ f_name = (char *) 0;
+
+ argv++;
+ if (--argc != 0) /* decode parameters */
+@@ -141,13 +141,6 @@
+ }
+ f_name = p; f_flag = 1;
+ break;
+- case 't' : /* table of long names */
+- if (!(*(++p))) {
+- if (!argc--) { printf("%s",u_text); exit(1); }
+- p = *argv++;
+- }
+- table = p;
+- break;
+ case 'I' : /* path name of includes */
+ if (!(*(++p))) {
+ if (!argc--) { printf("%s",u_text); exit(1); }
+@@ -171,7 +164,6 @@
+
+ if (x_flag & VER_FLAG) printf("Option flag: %x\n",x_flag);
+
+- if (table) fopen(table,"r");
+ if (!f_flag) f_name = new_file();
+
+ do { /* loop through one file */
diff --git a/debian/patches/fix_midfct_c.patch b/debian/patches/fix_midfct_c.patch
new file mode 100644
index 0000000..c0e1800
--- /dev/null
+++ b/debian/patches/fix_midfct_c.patch
@@ -0,0 +1,16 @@
+Author: Ole Streicher <debian at liska.ath.cx>
+Description: Fix the use of getcwd in midfct.c
+ In case of error, getcwd returns NULL, and the content of the buffer
+ is undefined.
+--- a/libsrc/st/midfct.c
++++ b/libsrc/st/midfct.c
+@@ -148,8 +148,7 @@
+ { /* we have a FITS file with a dir. */
+ char curdir[1024];
+
+- (void) getcwd(curdir,(size_t)1024);
+- if (curdir[0] != '\0')
++ if (getcwd(curdir,(size_t)1024) != NULL)
+ {
+ char *dirc, *dirnam;
+
diff --git a/debian/patches/series b/debian/patches/series
index 2bca1fc..340585e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,3 +16,5 @@ resolve_conflictig_macro.patch
fix_off_by_one_definitions.patch
remove_pointer_conversion.patch
fix_fitswdm_c.patch
+fix_midfct_c.patch
+fix_esoext_c.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/eso-midas.git
More information about the debian-science-commits
mailing list