updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / gnu-gift / 08_add-missing-headers.patch
blob6a9da80e58e3d51df76390e07f22f98ddaa017be
2 >>>> On Tue, 10 May 2005 23:59:36 +0100, Debian/IA64 non-US Build Daemon <buildd@caballero.debian.org> said:
4 > Function `malloc' implicitly converted to pointer at rgb2hsv_utils.c:186
5 > Function `malloc' implicitly converted to pointer at quantize.c:29
7 These are caused by a missing include of <stdlib.h> and, if reachable
8 at all, will cause a segfault on some arches (such as ia64) due to
9 pointer truncation (implicit "int" return value gets sign-extended to
10 64-bit pointer, which results in a crash if theh value is
11 dereferenced).
13 You can use the following script to filter build logs and check for
14 these types of errors:
16 http://people.debian.org/~dannf/check-implicit-pointer-functions
18 The attached patch fixes the problems.
20 Thanks,
22 --david
24 --- FeatureExtraction/rgb2hsv_utils.c~ 2002-07-22 00:09:28.000000000 -0700
25 +++ FeatureExtraction/rgb2hsv_utils.c 2005-05-11 02:18:15.000000000 -0700
26 @@ -1,4 +1,5 @@
27 #include <stdio.h>
28 +#include <stdlib.h>
29 #include <math.h>
30 #include "ppm.h"
32 --- FeatureExtraction/quantize.c~ 2002-07-22 00:09:28.000000000 -0700
33 +++ FeatureExtraction/quantize.c 2005-05-11 02:18:24.000000000 -0700
34 @@ -1,4 +1,5 @@
35 #include <math.h>
36 +#include <stdlib.h>
37 #include <ppm.h>
39 enum ppm_error hsv_quantize_ppm(PPM *im_hsv, PPM **im_quant, int **colmap, int numH, int numS, int numV, int numG) {