summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson <fergushenderson@users.noreply.github.com>2011-10-21 01:26:37 +0000
committerfergus.henderson <fergushenderson@users.noreply.github.com>2011-10-21 01:26:37 +0000
commitb6bf948082442071b68bd6a5330520c83b132da6 (patch)
tree99adbb04bfcf2d388551c6d1850901dcc14268b7
parentd21527c43e927a7404ab8c229dd0f994f7d59d29 (diff)
downloaddistcc-git-b6bf948082442071b68bd6a5330520c83b132da6.tar.gz
Fix a couple of compiler warnings.
Reviewed by Craig Silverstein.
-rw-r--r--popt/popthelp.c5
-rw-r--r--src/dotd.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/popt/popthelp.c b/popt/popthelp.c
index e12c908..7b10061 100644
--- a/popt/popthelp.c
+++ b/popt/popthelp.c
@@ -678,12 +678,13 @@ static int showShortOptions(const struct poptOption * opt, FILE * fp,
/*@globals fileSystem @*/
/*@modifies *str, *fp, fileSystem @*/
{
- char * s = alloca(300); /* larger then the ascii set */
+ size_t size = 300; /* larger then the ascii set */
+ char * s = alloca(size);
s[0] = '\0';
/*@-branchstate@*/ /* FIX: W2DO? */
if (str == NULL) {
- memset(s, 0, sizeof(s));
+ memset(s, 0, size);
str = s;
}
/*@=branchstate@*/
diff --git a/src/dotd.c b/src/dotd.c
index b09b336..a8c11ed 100644
--- a/src/dotd.c
+++ b/src/dotd.c
@@ -103,7 +103,7 @@ int dcc_cleanup_dotd(const char *dotd_fname,
}
tmp_dotd = fopen(*new_dotd_fname, "w");
- if ((tmp_dotd == NULL)) {
+ if (tmp_dotd == NULL) {
fclose(dotd);
return 1;
}