Fix LP64 problem.

This package does a lot of storing of ints in pointers and thus
generates a lot of cast warnings; I believe the others are harmless.
This commit is contained in:
dholland 2012-03-31 08:52:31 +00:00
parent 4aa9d9801a
commit 553ca37b7d
3 changed files with 58 additions and 3 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.33 2010/02/11 23:18:29 joerg Exp $
# $NetBSD: Makefile,v 1.34 2012/03/31 08:52:31 dholland Exp $
#
DISTNAME= xipdump-1.5.4
PKGREVISION= 4
PKGREVISION= 5
CATEGORIES= net
MASTER_SITES= http://www.lse.epita.fr/twiki/pub/Projects/XipDump/
EXTRACT_SUFX= .tgz

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.7 2011/12/14 04:05:33 sbd Exp $
$NetBSD: distinfo,v 1.8 2012/03/31 08:52:31 dholland Exp $
SHA1 (xipdump-1.5.4.tgz) = 8fa152cc9114fb3862a223be47e104394f00b250
RMD160 (xipdump-1.5.4.tgz) = 4202c4c3ac7a749d1b7a25caa9577a6529ee87df
@ -9,3 +9,4 @@ SHA1 (patch-ac) = 71c25f1fe5bb52667902c5a10f2a56d8809eb560
SHA1 (patch-ad) = 0c7bd3c0be1bffe19a7823add4c5c2ae3ff29ba3
SHA1 (patch-ae) = 7653b883f53ec90a231fa25d506f51f8cb75470a
SHA1 (patch-af) = 115aca8ae051caf44accb9b8d2a7acd691cd78fc
SHA1 (patch-mg__dict__int_c) = d01da78f568dd88c6439c2de4a8c31dfbc0367a8

View file

@ -0,0 +1,54 @@
$NetBSD: patch-mg__dict__int_c,v 1.1 2012/03/31 08:52:31 dholland Exp $
- fix LP64 problems
--- mg_dict_int.c~ 1999-11-15 08:47:23.000000000 +0000
+++ mg_dict_int.c
@@ -7,6 +7,7 @@
** Started on Wed Aug 25 16:24:56 1999 vianney rancurel
** Last update Thu Oct 28 20:16:20 1999
*/
+#include <stdint.h>
#include "mg.h"
/* is a t_vec_cmp_proc.
@@ -21,7 +22,7 @@ VOID_PTR *p2;
he1 = (t_hash_elt *)(*p1);
he2 = (t_hash_elt *)(*p2);
- return ((int)(he1->value) - (int)(he2->value));
+ return ((intptr_t)(he1->value) - (intptr_t)(he2->value));
}
/* walks a dictionary according to numerical order of the values */
@@ -48,10 +49,10 @@ char *str; /* String to be parsed */
int sep; /* Separator: e.g. comma */
{
t_vec *vec_str;
- VOID_PTR value;
+ intptr_t value;
t_status status;
- value = NULL;
+ value = 0;
if ((vec_str = vec_new(VEC_BASE,
FALSE,
dict->ht->alloc_algorithm_proc,
@@ -73,14 +74,14 @@ int sep; /* Separator: e.g. comma */
if (s = index(str,'='))
{
*s++ = 0;
- value = (VOID_PTR)atoi(s);
+ value = atoi(s);
}
- if ((status = dict_override(dict,str,value)) != 0)
+ if ((status = dict_override(dict,str,(VOID_PTR)value)) != 0)
{
vec_str_delete(vec_str);
return (status);
}
- value = (char *)value + 1;
+ value = value + 1;
}
VEC_ENDFOR;
vec_str_delete(vec_str);