Article View: es.comp.os.linux.programacion
Article #893Re: warning: pointer targets differ in signedness
From: Pere Pujal i Carabantes
Date: Mon, 18 Sep 2006 20:56
Date: Mon, 18 Sep 2006 20:56
69 lines
3312 bytes
3312 bytes
Hola Luis Angel!
El 18-09-2006
Luis Angel Fdez. Fdez. va escriure en
es.comp.os.linux.programacion:
> Pere Pujal i Carabantes <"ppujal A R R O B A"@airtel.net> escribi�:
> Hola
> [...]
> > bdbtarpit.c: In function 'dbtp_stati':
> > bdbtarpit.c:298: warning: passing argument 2 of
> > 'dbtp->dbaddr[ai]->stat' from incompatible pointer type
> > bdbtarpit.c:298: warning: passing argument 3 of
> > 'dbtp->dbaddr[ai]->stat' makes pointer from integer without a cast
> > bdbtarpit.c:298: error: too few arguments to function
> > 'dbtp->dbaddr[ai]->stat'
> Lo dem�s son /warnings/, pero este es el error. Y todo esto, en la
[...Acotacion del problema en torno a libdb...]
> Espero haber servido de algo :)
Pues voy avanzando (o retrocediendo segun se mire).
Como no tengo ni idea de como arreglar la linea que comentas,
he instalado una version de libdb que cae en el otro caso del if
(una 3.2.9, bastante anterior a la 3.4)
Ahora compila con warnings hasta que para en
cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.36\" -DXS_VERSION=\"0.36\"
-fPIC "-I/usr/lib/perl/5.8/CORE" CTest.c
In file included from CTest.xs:42:
/usr/include/linux/ip.h:93:2: error: #error "Endian problem - this didn't
happen"
Un cat -n /usr/include/linux/ip.h me muestra entre otras cosas:
85 struct iphdr {
86 #if defined(__LITTLE_ENDIAN_BITFIELD)
87 __u8 ihl:4,
88 version:4;
89 #elif defined (__BIG_ENDIAN_BITFIELD)
90 __u8 version:4,
91 ihl:4;
92 #else
93 #error "Endian problem - this didn't happen"
94 #endif
Con lo que supongo que si defino una de las dos variables la cosa se
arregla. Lo que no tengo ni idea de cual ni de donde seria el mejor
lugar para hacerlo.
El procesador es un P4 �little endian?
Bueno, por probar he puesto un #DEFINE __LITTLE_ENDIAN_BITFIEL en
/usr/include/linux/ip.h
y compila :)
Ahora falta saber si realmente es esa la variable que necesito.
> Ta llueu.
Salut
Pere
Technical Details
Message-ID:
<slrnegu204.bqa.ppujalARROBA@hola.fou.net>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news.glorb.com!news.antakira.com!mainake.escomposlinux.org!escomposlinux.org!news-5.escomposlinux.org!not-for-mailReferences:
<slrnegtfjd.80u.ppujalARROBA@hola.fou.net> <ohu2u3-j4a.ln1@muxin.no-ip.org>Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,7524b755ddd9cbd1 X-Google-Attributes: gidf86c8,public X-Google-Language: ENGLISH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news.glorb.com!news.antakira.com!mainake.escomposlinux.org!escomposlinux.org!news-5.escomposlinux.org!not-for-mail From: Pere Pujal i Carabantes <"ppujal A R R O B A"@airtel.net> Newsgroups: es.comp.os.linux.programacion Subject: Re: warning: pointer targets differ in signedness Date: Mon, 18 Sep 2006 20:56:36 +0000 (UTC) Organization: hola Lines: 69 Message-ID: <slrnegu204.bqa.ppujalARROBA@hola.fou.net> References: <slrnegtfjd.80u.ppujalARROBA@hola.fou.net> <ohu2u3-j4a.ln1@muxin.no-ip.org> Reply-To: Pere Pujal i Carabantes <ppujal A R R O B A@airtel.net> NNTP-Posting-Host: 105.red-81-34-83.dynamicip.rima-tde.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: news-5.escomposlinux.org 1158613213 4530 81.34.83.105 (18 Sep 2006 21:00:13 GMT) X-Complaints-To: mainake@escomposlinux.org NNTP-Posting-Date: Mon, 18 Sep 2006 21:00:13 +0000 (UTC) User-Agent: slrn/0.9.8.1 (Debian)