From 01b0c812275c884823ec20d122a7035a7df3861f Mon Sep 17 00:00:00 2001 From: Y Giridhar Appaji Nag Date: Sun, 10 Feb 2008 12:30:02 +0100 Subject: [PATCH] Bug 1002: Fix build failure on Debian GNU/Linux arch powerpc Change char id to enum bittorrent_message_id id to prevent FTBFS on powerpc and s390 --- NEWS | 2 ++ src/protocol/bittorrent/common.h | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 2cffd3a3..a39c2091 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,8 @@ To be released as 0.11.4. * minor: don't assume sizeof(int)==4 in bittorrent * trivial bug 947: document.html.wrap_nbsp also affects text in tables * trivial bug 997: fix unlikely stack corruption in active FTP +* build bug 1002: fix ``comparison is always true due to limited range + of data type'' warning on PowerPC and s390 * build bug 950: fix ``config/install-sh: No such file or directory'' on SunOS * build bug 936: fix errors about undefined off_t (autoheader diff --git a/src/protocol/bittorrent/common.h b/src/protocol/bittorrent/common.h index 87915c6c..c6c1f8a9 100644 --- a/src/protocol/bittorrent/common.h +++ b/src/protocol/bittorrent/common.h @@ -107,9 +107,7 @@ struct bittorrent_peer_request { uint16_t block; /* The block index in the piece. */ - /* This holds the message id when the request struct is used for queuing - * pending messages. */ - char id; /* -> enum bittorrent_message_id */ + enum bittorrent_message_id id; /* ID of queued pending message. */ unsigned int cloned:1; /* The request was cloned. */ unsigned int requested:1; /* Whether it has been requested. */