From: | "Alfredo Tupone (tupone)" <tupone@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in games-emulation/gngb/files: gngb-20060309-ovflfix.patch |
Date: | Thu, 28 Oct 2010 12:47:01 |
Message-Id: | 20101028124657.3449620054@flycatcher.gentoo.org |
1 | tupone 10/10/28 12:46:57 |
2 | |
3 | Added: gngb-20060309-ovflfix.patch |
4 | Log: |
5 | Fix gcc-4.5 overflow warning. Bug #340196 |
6 | |
7 | (Portage version: 2.1.9.22/cvs/Linux i686) |
8 | |
9 | Revision Changes Path |
10 | 1.1 games-emulation/gngb/files/gngb-20060309-ovflfix.patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/gngb/files/gngb-20060309-ovflfix.patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/gngb/files/gngb-20060309-ovflfix.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: gngb-20060309-ovflfix.patch |
16 | =================================================================== |
17 | --- src/serial.c.old 2010-10-28 14:40:23.000000000 +0200 |
18 | +++ src/serial.c 2010-10-28 14:41:07.000000000 +0200 |
19 | @@ -302,11 +302,11 @@ |
20 | /* Gbserial_read: Read a byte on the serial |
21 | This is a block function */ |
22 | Uint8 gbserial_read(void) { |
23 | - Uint8 b; |
24 | + Uint8 b[2]; |
25 | |
26 | gbserial.ready2read=0; |
27 | - if ((read(dest_socket,&b,2))<=0) return 0xFF; |
28 | - return b; |
29 | + if ((read(dest_socket,b,2))<=0) return 0xFF; |
30 | + return b[0]; |
31 | } |
32 | |
33 | /* Gbserial_write: Write a byte on the serial |