# HG changeset patch # User John W. Eaton # Date 1405612112 14400 # Node ID 770c0d79341bf443e2c02df2a8458fd574f17273 # Parent 37c98933f26cf39d85a6e1e06b6b8172d6f1e602 avoid some unused variable warnings if LLVM is not available * pt-jit.cc (UNUSED_WITHOUT_LLVM): New macro. Use it to tag args and nargout variables in functions that only work with LLVM. diff -r 37c98933f26c -r 770c0d79341b libinterp/corefcn/pt-jit.cc --- a/libinterp/corefcn/pt-jit.cc Thu Jul 17 11:47:36 2014 -0400 +++ b/libinterp/corefcn/pt-jit.cc Thu Jul 17 11:48:32 2014 -0400 @@ -2505,8 +2505,14 @@ #endif - -DEFUN (jit_failure_count, args, nargout, +#if defined (HAVE_LLVM) +#define UNUSED_WITHOUT_LLVM(x) x +#else +#define UNUSED_WITHOUT_LLVM(x) x GCC_ATTR_UNUSED +#endif + +DEFUN (jit_failure_count, UNUSED_WITHOUT_LLVM (args), + UNUSED_WITHOUT_LLVM (nargout), "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} jit_failure_count ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} jit_failure_count (@var{new_val})\n\ @@ -2528,7 +2534,8 @@ #endif } -DEFUN (debug_jit, args, nargout, +DEFUN (debug_jit, UNUSED_WITHOUT_LLVM (args), + UNUSED_WITHOUT_LLVM (nargout), "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} debug_jit ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} debug_jit (@var{new_val})\n\ @@ -2550,7 +2557,8 @@ #endif } -DEFUN (jit_enable, args, nargout, +DEFUN (jit_enable, UNUSED_WITHOUT_LLVM (args), + UNUSED_WITHOUT_LLVM (nargout), "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} jit_enable ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} jit_enable (@var{new_val})\n\ @@ -2571,7 +2579,8 @@ #endif } -DEFUN (jit_startcnt, args, nargout, +DEFUN (jit_startcnt, UNUSED_WITHOUT_LLVM (args), + UNUSED_WITHOUT_LLVM (nargout), "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} jit_startcnt ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} jit_startcnt (@var{new_val})\n\