summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-21 20:50:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-22 12:26:40 +0000
commitd7eb0ef560fb6b549f0054140e3b42d0a991bffe (patch)
treed29909fcddb6ba7a955668ffedffb406aea6100c /soltools
parenteedbe7163bf3979ae392b3b88227ee68e1df12fe (diff)
WaE: ignoring return value of 'fwrite'
Diffstat (limited to 'soltools')
-rw-r--r--soltools/mkdepend/pr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c
index 082e312ed230..f472f28ebd75 100644
--- a/soltools/mkdepend/pr.c
+++ b/soltools/mkdepend/pr.c
@@ -29,7 +29,7 @@ in this Software without prior written authorization from the X Consortium.
#include "def.h"
#include <string.h>
-void pr( struct inclist *ip, char *file,char *base);
+size_t pr( struct inclist *ip, char *file,char *base);
extern struct inclist inclist[ MAXFILES ],
*inclistp;
@@ -94,10 +94,11 @@ void recursive_pr_include(head, file, base)
recursive_pr_include(head->i_list[ i ], file, base);
}
-void pr(ip, file, base)
+size_t pr(ip, file, base)
register struct inclist *ip;
char *file, *base;
{
+ size_t ret;
static char *lastfile;
static int current_len;
register int len, i;
@@ -116,18 +117,19 @@ void pr(ip, file, base)
strcpy(buf+1, ip->i_file);
current_len += len;
}
- fwrite(buf, len, 1, stdout);
+ ret = fwrite(buf, len, 1, stdout);
/*
* If verbose is set, then print out what this file includes.
*/
if (! verbose || ip->i_list == NULL || ip->i_notified)
- return;
+ return ret;
ip->i_notified = TRUE;
lastfile = NULL;
printf("\n# %s includes:", ip->i_file);
for (i=0; i<ip->i_listlen; i++)
printf("\n#\t%s", ip->i_list[ i ]->i_incstring);
+ return ret;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */