mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
Avoid bogus gcc warning
Recent gcc/glibc combinations warn about ignoring the fgets() result. The problem exists on Ubuntu 9.10 with current updates. This "fix" of the non-problem (as I check ferror() afterwards) should even be a (negligible) performance optimization. Corresponding to flashrom svn r884. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Andrew Morgan <ziltro@ziltro.com>
This commit is contained in:
parent
06602c239c
commit
823dc9d9bc
4
dmi.c
4
dmi.c
@ -79,8 +79,8 @@ void dmi_init(void)
|
||||
printf_debug("DMI pipe open error\n");
|
||||
goto out_free;
|
||||
}
|
||||
fgets(answerbuf, DMI_MAX_ANSWER_LEN, dmidecode_pipe);
|
||||
if (ferror(dmidecode_pipe))
|
||||
if (!fgets(answerbuf, DMI_MAX_ANSWER_LEN, dmidecode_pipe) &&
|
||||
ferror(dmidecode_pipe))
|
||||
{
|
||||
printf_debug("DMI pipe read error\n");
|
||||
pclose(dmidecode_pipe);
|
||||
|
Loading…
x
Reference in New Issue
Block a user