From f4aa4a048627aecd54bfb0ed05dc0c6d3110b38d Mon Sep 17 00:00:00 2001 From: "fergus.henderson" Date: Fri, 21 Oct 2011 01:26:37 +0000 Subject: 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 --- popt/popthelp.c | 5 +++-- 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@*/ 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; } -- cgit v1.2.1