Peter Maydell <peter.mayd...@linaro.org> writes: > On 5 July 2011 07:15, Markus Armbruster <arm...@redhat.com> wrote: >>> + int fd, __attribute__((unused)) ret; >>> >>> snprintf(reset_file, sizeof(reset_file), >>> "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/reset", >> >> What about (void)write() and do away with ret? > > If 'ret' has been used to silence compiler warnings about functions > which have been declared with attribute __warn_unused_result__ > (eg write() and various other libc functions) then "(void)write()" > is insufficient -- gcc requires the variable.
gcc being silly. Oh well.