Avoid warnings.
This commit is contained in:
@@ -211,7 +211,7 @@ int upx_zlib_test_overlap ( const upx_bytep buf, unsigned src_off,
|
|||||||
// verify the final result in any case.
|
// verify the final result in any case.
|
||||||
|
|
||||||
unsigned dlen = *dst_len;
|
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);
|
//printf("upx_zlib_test_overlap: %d\n", overlap_overhead);
|
||||||
|
|
||||||
upx_bytep const dst = (upx_bytep)malloc(src_off + src_len);
|
upx_bytep const dst = (upx_bytep)malloc(src_off + src_len);
|
||||||
|
|||||||
+9
-5
@@ -58,12 +58,13 @@
|
|||||||
|
|
||||||
void do_one_file(const char *iname, char *oname)
|
void do_one_file(const char *iname, char *oname)
|
||||||
{
|
{
|
||||||
|
int r;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
memset(&st, 0, sizeof(st));
|
memset(&st, 0, sizeof(st));
|
||||||
#if defined(HAVE_LSTAT)
|
#if defined(HAVE_LSTAT)
|
||||||
int r = lstat(iname,&st);
|
r = lstat(iname,&st);
|
||||||
#else
|
#else
|
||||||
int r = stat(iname,&st);
|
r = stat(iname,&st);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
@@ -211,15 +212,18 @@ void do_one_file(const char *iname, char *oname)
|
|||||||
struct utimbuf u;
|
struct utimbuf u;
|
||||||
u.actime = st.st_atime;
|
u.actime = st.st_atime;
|
||||||
u.modtime = st.st_mtime;
|
u.modtime = st.st_mtime;
|
||||||
(void) ::utime(name,&u);
|
r = utime(name, &u);
|
||||||
|
UNUSED(r);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_CHMOD)
|
#if defined(HAVE_CHMOD)
|
||||||
// copy permissions
|
// copy permissions
|
||||||
(void) ::chmod(name, st.st_mode);
|
r = chmod(name, st.st_mode);
|
||||||
|
UNUSED(r);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_CHOWN)
|
#if defined(HAVE_CHOWN)
|
||||||
// copy the ownership
|
// copy the ownership
|
||||||
(void) ::chown(name, st.st_uid, st.st_gid);
|
r = chown(name, st.st_uid, st.st_gid);
|
||||||
|
UNUSED(r);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user