Removed nop() macro.

committer: mfx <mfx> 979746778 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2001-01-17 15:52:58 +00:00
parent afc55d76e7
commit 4a52be76fe
2 changed files with 5 additions and 11 deletions

View File

@ -299,10 +299,6 @@ typedef RETSIGTYPE (SIGTYPEENTRY *sig_type)(int);
#define outp upx_outp
// a dummy statement
#define nop ((void)0)
#define COMPILE_TIME_ASSERT(expr) \
{ typedef int __upx_compile_time_assert_fail[(expr) ? 1 : -1]; }
@ -332,9 +328,6 @@ typedef RETSIGTYPE (SIGTYPEENTRY *sig_type)(int);
// memory util
**************************************************************************/
#undef FREE
#define FREE(ptr) if (ptr) { free(ptr); ptr = NULL; }
#undef UNUSED
#if 1
# define UNUSED(var) { typedef int __upx_unused[sizeof(var) ? 2 : 1]; }

View File

@ -77,13 +77,14 @@ void do_one_file(const char *iname, char *oname)
throwIOException("empty file -- skipped");
if ((st.st_mode & S_IWUSR) == 0)
{
bool skip = true;
if (opt->output_name)
nop;
skip = false;
else if (opt->to_stdout)
nop;
skip = false;
else if (opt->backup)
nop;
else
skip = false;
if (skip)
throwIOException("file is write protected -- skipped");
}