]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Explicitly cast return value of read(2) to "int"
authorAlexander Barton <alex@barton.de>
Wed, 22 Sep 2010 12:15:46 +0000 (14:15 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 22 Sep 2010 12:15:46 +0000 (14:15 +0200)
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

index b8e8013d31c2671143babc96724912d40ab9a769..427789c3fbbaf291aa026753aa4d86bcc76c1f66 100644 (file)
@@ -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));