diff options
author | fergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917> | 2011-10-21 01:26:37 +0000 |
---|---|---|
committer | fergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917> | 2011-10-21 01:26:37 +0000 |
commit | f4aa4a048627aecd54bfb0ed05dc0c6d3110b38d (patch) | |
tree | 99adbb04bfcf2d388551c6d1850901dcc14268b7 | |
parent | 2a2e30abc22ea32985ee0ea055f0eafc195c777a (diff) | |
download | distcc-f4aa4a048627aecd54bfb0ed05dc0c6d3110b38d.tar.gz |
Fix a couple of compiler warnings.
Reviewed by Craig Silverstein.
git-svn-id: http://distcc.googlecode.com/svn/trunk@743 01de4be4-8c4a-0410-9132-4925637da917
-rw-r--r-- | popt/popthelp.c | 5 | ||||
-rw-r--r-- | src/dotd.c | 2 |
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@*/ @@ -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; } |