Module: ngircd.git Branch: master Commit: e2ba7e08b4a4ca73a74c10e7189b46f6d8dcfc75 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=e2ba7...
Author: Alexander Barton alex@barton.de Date: Wed Sep 22 14:15:46 2010 +0200
Explicitly cast return value of read(2) to "int"
This fixes the following gcc warning, emitted by Xcode:
src/ngircd/sighandlers.c: In function 'Signal_Callback': src/ngircd/sighandlers.c:239: warning: implicit conversion shortens 64-bit value into a 32-bit value
---
src/ngircd/sighandlers.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/ngircd/sighandlers.c b/src/ngircd/sighandlers.c index b8e8013..427789c 100644 --- a/src/ngircd/sighandlers.c +++ b/src/ngircd/sighandlers.c @@ -236,7 +236,7 @@ Signal_Callback(int fd, short UNUSED what) (void) what;
do { - ret = read(fd, &sig, sizeof(sig)); + ret = (int)read(fd, &sig, sizeof(sig)); if (ret == sizeof(int)) Signal_Handler_BH(sig); } while (ret == sizeof(int));