Article View: es.comp.os.linux.programacion
Article #890Re: warning: pointer targets differ in signedness
From: Luis Angel Fdez. Fdez.
Date: Mon, 18 Sep 2006 16:36
Date: Mon, 18 Sep 2006 16:36
54 lines
3348 bytes
3348 bytes
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
l�nea...
297 #ifdef AT_LEAST_DB_3_3
298 dbtp->dberr = dbtp->dbaddr[ai]->stat(dbtp->dbaddr[ai],&statistics,DB_FAST_STAT);
299 #else
300 dbtp->dberr = dbtp->dbaddr[ai]->stat(dbtp->dbaddr[ai],&statistics,NULL,DB_RECORDCOUNT);
301 #endif
Mirando un poco por la web, veo en la p�gina de Berkeley DB que:
int DB->stat(DB *db, DB_TXN *txnid, void *sp, u_int32_t flags);
Y eso, si no me equivoco, para la versi�n 4.4.20.
As� que, una vez mas, si no estoy metiendo la pata, es posible que
el #ifdef ese est� mal ya que para una versi�n 4.4.X que es /por lo
menos una 3.3.X/ la funci�n stat precisa de cuatro argumentos.
Lo que no se es como arreglarlo, pero creo que el problema es ese.
Quiz�s, suponiendo que &statistics se corresponde con void *sp por
aquello de 's'tatistics 'p'ointer, funcione poner un NULL donde ir�a
el DB_TXN *txnid. Salvo que sepas que puede ir ah� :) porque...
"txnid
If the operation is part of an application-specified transaction,
the txnid parameter is a transaction handle returned from
DB_ENV->txn_begin; otherwise NULL. If no transaction handle is
specified, but the operation occurs in a transactional database, the
operation will be implicitly transaction protected."
Espero haber servido de algo :)
Ta llueu.
--
Ubuntu 6.06 (dapper) (kernel 2.6.15-26-amd64-generic x86_64)
AMD Athlon(tm) 64 Processor 3200+ (2200.149 MHz) up 3 days, 10:01
HT: C.D. Arrancatapinos (488047) VI.759 # http://muxin.no-ip.org/
SK: C.D. Arrancatapinos (18088) IV.57 # http://muxin.yi.org/
Technical Details
Message-ID:
<ohu2u3-j4a.ln1@muxin.no-ip.org>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!news.buerger.net!open-news-network.org!news.antakira.com!antonio.escomposlinux.org!escomposlinux.org!not-for-mailReferences:
<slrnegtfjd.80u.ppujalARROBA@hola.fou.net>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!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!news.buerger.net!open-news-network.org!news.antakira.com!antonio.escomposlinux.org!escomposlinux.org!not-for-mail
From: "Luis Angel Fdez. Fdez." <laffdez@gmail.com>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: warning: pointer targets differ in signedness
Date: Mon, 18 Sep 2006 18:36:40 +0200
Organization: Servidor de noticias de la red Ecolnet
Lines: 54
Message-ID: <ohu2u3-j4a.ln1@muxin.no-ip.org>
References: <slrnegtfjd.80u.ppujalARROBA@hola.fou.net>
NNTP-Posting-Host: 178.red-80-34-249.staticip.rima-tde.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: antonio.escomposlinux.org 1158597446 10593 80.34.249.178 (18 Sep 2006 16:37:26 GMT)
X-Complaints-To: newsmaster@antonio.escomposlinux.org
NNTP-Posting-Date: Mon, 18 Sep 2006 16:37:26 +0000 (UTC)
User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (Linux/2.6.15-26-amd64-generic (x86_64))