[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #24009] does not check for short write()s
From: |
Martin Pitt |
Subject: |
[bug #24009] does not check for short write()s |
Date: |
Wed, 06 Aug 2008 11:51:04 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071816 Ubuntu/8.10 (intrepid) Firefox/3.0.1 |
URL:
<http://savannah.gnu.org/bugs/?24009>
Summary: does not check for short write()s
Project: Guile
Submitted by: martinpitt
Submitted on: Mittwoch 06.08.2008 um 11:51
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
When building guile under current ubuntu (gcc-4.3, with FORTIFY_SOURCE=2), it
detects a lot of cases where write() is called without checking the return
value:
/bin/bash ../libtool --tag=CC --mode=compile i486-linux-gnu-gcc
-DHAVE_CONFIG_H -I.. -I.. -I.. -pthread -O2 -g -Wall -Wmissing-prototypes
-Werror -MT libguile_la-async.lo -MD -MP -MF .deps/libguile_la-async.Tpo -c -o
libguile_la-async.lo `test -f 'async.c' || echo './'`async.c
i486-linux-gnu-gcc -DHAVE_CONFIG_H -I.. -I.. -I.. -pthread -O2 -g -Wall
-Wmissing-prototypes -Werror -MT libguile_la-async.lo -MD -MP -MF
.deps/libguile_la-async.Tpo -c async.c -fPIC -DPIC -o
.libs/libguile_la-async.o
cc1: warnings being treated as errors
async.c: In function ‘scm_i_queue_async_cell’:
async.c:250: error: ignoring return value of ‘write’, declared with
attribute warn_unused_result
Some of those might actually be harmless and can be cast into (void), but in
most cases a short write is a source of unexpected and hard to debug errors.
Maybe consider using a full_write() wrapper (like in gnulib) which repeatedly
writes until everything is sent?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?24009>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/
- [bug #24009] does not check for short write()s,
Martin Pitt <=