agetty.c warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

Just building latest code and saw the compiler generated some
warnings.  Just thinking, one idea is to check the return value, and
use it as best possible (even just for trace) or (void)bytes to make
it go quiet when there really is no use.

bytes  = write(1, "\n", 1);

There is the same build warning from another file calling write()
during the util-linux build as well.

Best regards, Jon


agetty.c: In function âmainâ:
agetty.c:307: warning: ignoring return value of âwriteâ, declared with
attribute warn_unused_result
agetty.c:357: warning: ignoring return value of âwriteâ, declared with
attribute warn_unused_result
agetty.c: In function âopen_ttyâ:
agetty.c:690: warning: ignoring return value of âchownâ, declared with
attribute warn_unused_result
agetty.c: In function âdo_promptâ:
agetty.c:836: warning: ignoring return value of âwriteâ, declared with
attribute warn_unused_result
agetty.c:979: warning: ignoring return value of âwriteâ, declared with
attribute warn_unused_result
agetty.c:981: warning: ignoring return value of âwriteâ, declared with
attribute warn_unused_result
agetty.c: In function âget_lognameâ:
agetty.c:1082: warning: ignoring return value of âwriteâ, declared
with attribute warn_unused_result
agetty.c:1090: warning: ignoring return value of âwriteâ, declared
with attribute warn_unused_result
agetty.c:1102: warning: ignoring return value of âwriteâ, declared
with attribute warn_unused_result
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux