printf-utils: Fix compile warning: declared with attribute warn_unused_result
This commit is contained in:
1 parent
a1febdd2ea
commit
a02caaac15
1 file changed
+3
-3
+3
-3
@@ -77,7 +77,8 @@ void printf_and_wait(const char * format, ...) {
|
|||||||
FD_SET(0, &rfds);
|
FD_SET(0, &rfds);
|
||||||
|
|
||||||
while ( select(1, &rfds, NULL, NULL, &tv) == 1 )
|
while ( select(1, &rfds, NULL, NULL, &tv) == 1 )
|
||||||
read(0, &c, 1);
|
if ( read(0, &c, 1) < 0 )
|
||||||
|
break;
|
||||||
|
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
vprintf(format, ap);
|
vprintf(format, ap);
|
||||||
@@ -88,8 +89,7 @@ void printf_and_wait(const char * format, ...) {
|
|||||||
FD_SET(0, &rfds);
|
FD_SET(0, &rfds);
|
||||||
|
|
||||||
while ( select(1, &rfds, NULL, NULL, NULL) == 1 ) {
|
while ( select(1, &rfds, NULL, NULL, NULL) == 1 ) {
|
||||||
read(0, &c, 1);
|
if ( read(0, &c, 1) < 0 || c == '\n' )
|
||||||
if ( c == '\n' )
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user