diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 11:28:23 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 11:28:23 +0100 |
commit | e64e5f7438497707a97da41a07ca787e04d5f311 (patch) | |
tree | 31ebe42337e32d1a1265944b1ae6957ba684600f /gcc/ada/g-sercom-linux.adb | |
parent | ff149a358cd46b8e54a0080e8c714103a8def136 (diff) | |
download | gcc-e64e5f7438497707a97da41a07ca787e04d5f311.zip gcc-e64e5f7438497707a97da41a07ca787e04d5f311.tar.gz gcc-e64e5f7438497707a97da41a07ca787e04d5f311.tar.bz2 |
[multiple changes]
2009-11-30 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: Update gnatcheck doc.
2009-11-30 Robert Dewar <dewar@adacore.com>
make.adb, prj-makr.adb, g-sothco.ads: Minor reformattting
* s-taprop-dummy.adb: Minor code reorganization (raise with msgs start
with lower case).
* i-vxwoio.adb, g-dirope.adb, g-sercom-linux.adb,
g-enblsp-vms-alpha.adb, g-regist.adb, s-imgcha.adb, s-tarest.adb,
s-taprop-mingw.adb, g-exctra.adb, g-expect.adb, g-comlin.adb,
g-debpoo.adb, g-expect-vms.adb, g-pehage.adb, g-trasym-vms-alpha.adb,
g-enblsp-vms-ia64.adb, s-fatgen.adb, s-fileio.adb: Minor code
reorganization (use conditional expressions).
From-SVN: r154773
Diffstat (limited to 'gcc/ada/g-sercom-linux.adb')
-rw-r--r-- | gcc/ada/g-sercom-linux.adb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/ada/g-sercom-linux.adb b/gcc/ada/g-sercom-linux.adb index c25d5e8..b1b5d34 100644 --- a/gcc/ada/g-sercom-linux.adb +++ b/gcc/ada/g-sercom-linux.adb @@ -211,7 +211,10 @@ package body GNAT.Serial_Communications is pragma Import (C, tcflush, "tcflush"); Current : termios; - Res : int; + + Res : int; + pragma Warnings (Off, Res); + -- Warnings off, since we don't always test the result begin if Port.H = null then @@ -246,11 +249,7 @@ package body GNAT.Serial_Communications is -- Block - if Block then - Res := fcntl (int (Port.H.all), F_SETFL, 0); - else - Res := fcntl (int (Port.H.all), F_SETFL, FNDELAY); - end if; + Res := fcntl (int (Port.H.all), F_SETFL, (if Block then 0 else FNDELAY)); if Res = -1 then Raise_Error ("set: fcntl failed"); |