mirror of
https://github.com/upx/upx.git
synced 2024-11-27 22:50:32 +00:00
Avoid warnings.
This commit is contained in:
parent
b943c9b471
commit
5f203fc082
@ -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);
|
||||
|
14
src/work.cpp
14
src/work.cpp
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user