diff options
author | Jeff Trawick <trawick@apache.org> | 2011-03-19 16:53:29 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2011-03-19 16:53:29 +0000 |
commit | ff626c832a5965019450d5884e2e2fe39bb2983d (patch) | |
tree | f9bf2809871260da2e6bfeec4642f822c96f1353 | |
parent | 80657f2ebe1d729d0ded1f3b6717169681c0f6a6 (diff) | |
download | apr-ff626c832a5965019450d5884e2e2fe39bb2983d.tar.gz |
fix some gcc warnings on Windows
the return of APR_EGENERAL is to bypass a theoretical reference to an
unset variable (sizelo) in a should-not-occur path, following an
existing example
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1083227 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | file_io/win32/filestat.c | 4 | ||||
-rw-r--r-- | user/win32/userinfo.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/file_io/win32/filestat.c b/file_io/win32/filestat.c index a149ae4b9..79193bdcc 100644 --- a/file_io/win32/filestat.c +++ b/file_io/win32/filestat.c @@ -268,7 +268,7 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile, ((wanted & APR_FINFO_PROT) ? &dacl : NULL), NULL, &pdesc); else - return APR_INCOMPLETE; + return APR_INCOMPLETE; /* should not occur */ if (rv == ERROR_SUCCESS) apr_pool_cleanup_register(finfo->pool, pdesc, free_localheap, apr_pool_cleanup_null); @@ -319,6 +319,8 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile, sizelo = GetCompressedFileSizeW((apr_wchar_t*)ufile, &sizehi); else if (whatfile == MORE_OF_FSPEC) sizelo = GetCompressedFileSizeA((char*)ufile, &sizehi); + else + return APR_EGENERAL; /* should not occur */ if (sizelo != INVALID_FILE_SIZE || GetLastError() == NO_ERROR) { #if APR_HAS_LARGE_FILES diff --git a/user/win32/userinfo.c b/user/win32/userinfo.c index f343d9582..12931ade6 100644 --- a/user/win32/userinfo.c +++ b/user/win32/userinfo.c @@ -46,7 +46,7 @@ static void get_sid_string(char *buf, apr_size_t blen, apr_uid_t id) sa = (DWORD)(psia->Value[1]) + ((DWORD)(psia->Value[0]) << 8); if (sa) { slen = apr_snprintf(buf, blen, "S-%d-0x%04x%08x", - SID_REVISION, sa, nsa); + SID_REVISION, (unsigned int)sa, (unsigned int)nsa); } else { slen = apr_snprintf(buf, blen, "S-%d-%lu", SID_REVISION, nsa); |