xen/xen-warnings.diff

52 lines
1.8 KiB
Diff

Index: xen-unstable/xen/tools/symbols.c
===================================================================
--- xen-unstable.orig/xen/tools/symbols.c
+++ xen-unstable/xen/tools/symbols.c
@@ -120,7 +120,8 @@ read_symbol(FILE *in, struct sym_entry *
if (rc != 3) {
if (rc != EOF) {
/* skip line */
- fgets(str, 500, in);
+ if (fgets(str, sizeof(str), in) == NULL)
+ ; /* don't care */
}
return -1;
}
Index: xen-unstable/tools/misc/miniterm/miniterm.c
===================================================================
--- xen-unstable.orig/tools/misc/miniterm/miniterm.c
+++ xen-unstable/tools/misc/miniterm/miniterm.c
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
case 0:
close(1); /* stdout not needed */
for ( c = (char)getchar(); c != ENDMINITERM; c = (char)getchar() )
- write(fd,&c,1);
+ if (write(fd,&c,1)) ;
tcsetattr(fd,TCSANOW,&oldsertio);
tcsetattr(0,TCSANOW,&oldstdtio);
close(fd);
@@ -169,19 +169,19 @@ int main(int argc, char **argv)
close(fd);
exit(-1);
default:
- write(1, start_str, strlen(start_str));
+ if (write(1, start_str, strlen(start_str))) ;
close(0); /* stdin not needed */
sa.sa_handler = child_handler;
sa.sa_flags = 0;
sigaction(SIGCHLD,&sa,NULL); /* handle dying child */
while ( !stop )
{
- read(fd,&c,1); /* modem */
+ if (read(fd,&c,1)) ; /* modem */
c = (char)c;
- write(1,&c,1); /* stdout */
+ if (write(1,&c,1)) ; /* stdout */
}
wait(NULL); /* wait for child to die or it will become a zombie */
- write(1, end_str, strlen(end_str));
+ if (write(1, end_str, strlen(end_str))) ;
break;
}