diff options
author | fergus.henderson <fergushenderson@users.noreply.github.com> | 2011-10-21 01:26:37 +0000 |
---|---|---|
committer | fergus.henderson <fergushenderson@users.noreply.github.com> | 2011-10-21 01:26:37 +0000 |
commit | b6bf948082442071b68bd6a5330520c83b132da6 (patch) | |
tree | 99adbb04bfcf2d388551c6d1850901dcc14268b7 /popt | |
parent | d21527c43e927a7404ab8c229dd0f994f7d59d29 (diff) | |
download | distcc-git-b6bf948082442071b68bd6a5330520c83b132da6.tar.gz |
Fix a couple of compiler warnings.
Reviewed by Craig Silverstein.
Diffstat (limited to 'popt')
-rw-r--r-- | popt/popthelp.c | 5 |
1 files changed, 3 insertions, 2 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@*/ |