From e2ba7e08b4a4ca73a74c10e7189b46f6d8dcfc75 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Wed, 22 Sep 2010 14:15:46 +0200 Subject: [PATCH] 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ngircd/sighandlers.c b/src/ngircd/sighandlers.c index b8e8013d..427789c3 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)); -- 2.39.2