Hello everyone.. I am mainteiner of linerv.
I had a little problem to build for ia64. I fixed it but there are
some warning about pointer dimensions. I have prepared a patch for
them but I would like to be sure that the patch is correct, so I
attach it here.
You can find linesrv sources in unstable tree.
These are the warnings:
fakeroot debian/rules clean
dpkg-source -b linesrv-2.1.15
debian/rules build
../../server/cmd.c: In function `cmd_q':
../../server/cmd.c:60: warning: int format, different type arg (arg
3)
../../server/cmd.c:69: warning: cast from pointer to integer of
different size
../../server/cmd.c: In function `ack_q':
../../server/cmd.c:291: warning: int format, different type arg (arg
3)
../../server/cmd.c: In function `cmd_q':
../../server/cmd.c:60: warning: int format, different type arg (arg
3)
../../server/cmd.c:69: warning: cast from pointer to integer of
different size
../../server/cmd.c: In function `ack_q':
../../server/cmd.c:291: warning: int format, different type arg (arg
3)
This is the patch I have prepared:
diff -urN linesrv-2.1/server/cmd.c linesrv-2.1.new/server/cmd.c
--- linesrv-2.1/server/cmd.c 2001-11-05 13:41:59.000000000 -0700
+++ linesrv-2.1.new/server/cmd.c 2002-11-02
15:25:31.000000000 -0700
@@ -57,7 +57,7 @@
if ( msglen < efflen ) efflen = msglen;
if ( (item = (struct ordq_item_t*)list_add(&ordq, sizeof(struct
ordq_item_t))) == NULL )
{
- syslog(LOG_WARNING, "cmd_q(): malloc(%d) returned NULL",
sizeof(struct ordq_item_t));
+ syslog(LOG_WARNING, "cmd_q(): malloc(%d) returned NULL", (int)
sizeof(struct ordq_item_t));
return(-2);
}
item->ip = who->ip;
diff -urN linesrv-2.1/server/cmd.c linesrv-2.1.new/server/cmd.c
--- linesrv-2.1/server/cmd.c 2002-11-02 15:37:11.000000000 -0700
+++ linesrv-2.1.new/server/cmd.c 2002-11-02
15:36:40.000000000 -0700
@@ -66,7 +66,7 @@
item->len = efflen;
if ( msg != NULL ) memcpy(item->msg, msg, efflen);
// look for waiting ackq-entries of this client
- if ( list_find(&ackq, (int)who) == NULL ) return(cmd_send(item));
+ if ( list_find(&ackq, (int) sizeof(who)) == NULL )
return(cmd_send(item));
return(0);
}
diff -urN linesrv-2.1/server/cmd.c linesrv-2.1.new/server/cmd.c
--- linesrv-2.1/server/cmd.c 2002-11-02 15:43:13.000000000 -0700
+++ linesrv-2.1.new/server/cmd.c 2002-11-02
15:43:00.000000000 -0700
@@ -288,7 +288,7 @@
// >= CBR_INFO, so block
here.
if ( (item = (struct ackq_item_t*)list_add(&ackq, sizeof(struct
ackq_item_t))) == NULL )
{
- syslog(LOG_WARNING, "ack_q(): malloc(%d) returned NULL",
sizeof(struct ackq_item_t));
+ syslog(LOG_WARNING, "ack_q(): malloc(%d) returned NULL", (int)
sizeof(struct ackq_item_t));
return(-2);
}
item->ip = which->ip;
To easy work with the patches I have used dbs.
Pls take me in CC: as I am not subscribed to this ml.
Tnks for your suggestions
Marco
--
pgpGhz8fm5XPI.pgp
Description: PGP signature

