Avoid warnings.

This commit is contained in:
Markus F.X.J. Oberhumer 2007-04-26 13:13:26 +02:00
parent b943c9b471
commit 5f203fc082
2 changed files with 10 additions and 6 deletions

View File

@ -211,7 +211,7 @@ int upx_zlib_test_overlap ( const upx_bytep buf, unsigned src_off,
// verify the final result in any case.
unsigned dlen = *dst_len;
unsigned overlap_overhead = src_off + src_len - dlen;
//unsigned overlap_overhead = src_off + src_len - dlen;
//printf("upx_zlib_test_overlap: %d\n", overlap_overhead);
upx_bytep const dst = (upx_bytep)malloc(src_off + src_len);

View File

@ -58,12 +58,13 @@
void do_one_file(const char *iname, char *oname)
{
int r;
struct stat st;
memset(&st, 0, sizeof(st));
#if defined(HAVE_LSTAT)
int r = lstat(iname,&st);
r = lstat(iname,&st);
#else
int r = stat(iname,&st);
r = stat(iname,&st);
#endif
if (r != 0)
@ -211,15 +212,18 @@ void do_one_file(const char *iname, char *oname)
struct utimbuf u;
u.actime = st.st_atime;
u.modtime = st.st_mtime;
(void) ::utime(name,&u);
r = utime(name, &u);
UNUSED(r);
#endif
#if defined(HAVE_CHMOD)
// copy permissions
(void) ::chmod(name, st.st_mode);
r = chmod(name, st.st_mode);
UNUSED(r);
#endif
#if defined(HAVE_CHOWN)
// copy the ownership
(void) ::chown(name, st.st_uid, st.st_gid);
r = chown(name, st.st_uid, st.st_gid);
UNUSED(r);
#endif
}