File: Fix-some-compiler-warnings.patch

package info (click to toggle)
wcstools 3.9.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,680 kB
  • sloc: ansic: 113,336; sh: 553; makefile: 246; lisp: 86; sed: 1
file content (34 lines) | stat: -rw-r--r-- 944 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Ole Streicher <debian@liska.ath.cx>
Date: Fri, 5 Aug 2016 16:17:42 +0200
Subject: Fix some compiler warnings.

---
 libwcs/imhfile.c | 2 +-
 libwcs/webread.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libwcs/imhfile.c b/libwcs/imhfile.c
index b618686..4279d3c 100644
--- a/libwcs/imhfile.c
+++ b/libwcs/imhfile.c
@@ -1075,7 +1075,7 @@ char	*hdrname;	/* IRAF image header file pathname */
 
 	/* add name */
 	newpixname[len] = '\0';
-	(void)strncat (newpixname, pixname, SZ_IM2PIXFILE);
+	(void)strncat (newpixname, pixname, SZ_IM2PIXFILE - len);
 	}
 
     /* Pixel file has same name as header file, but with .pix extension */
diff --git a/libwcs/webread.c b/libwcs/webread.c
index 3f5b86b..4de8e15 100644
--- a/libwcs/webread.c
+++ b/libwcs/webread.c
@@ -32,6 +32,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <ctype.h>
 #include <math.h>
 #include <ctype.h>
 #include "wcs.h"