diff __py_struct_from_dict__.cc @ 420:7864849e84c2

Eliminate some compiler warnings * Makefile.am (AM_CXXFLAGS): Build with -W -Wall by default. * __py_struct_from_dict__.cc (F__py_int64_scalar_value__, F__py_uint64_scalar_value__, F__py_is_none__, F__py_isinstance__, F__py_objstore_del__, F__py_objstore_get__, F__py_objstore_put__, F__py_string_value__, F__py_struct_from_dict__): Remove unused parameter to eliminate -Wunused-parameter warning. * pyexec.cc (Fpyexec): Likewise. * oct-py-init.cc (pytave::py_init): Declare argv array correctly to eliminate -Wwrite-strings warning. * oct-py-types.cc (pytave::make_py_bool): Explicitly increment and return value to eliminate -Wstrict-aliasing warning. (pytave::make_py_complex, pytave::extract_py_complex): Copy complex values between C++ and Python types to eliminate -Wstrict-aliasing warning. (pytave::extract_py_int64): Add braces to nested if block to eliminate -Wparentheses warning.
author Mike Miller <mtmiller@octave.org>
date Thu, 04 May 2017 12:31:07 -0700
parents 9bf8ba050122
children 8247f298fd16
line wrap: on
line diff
--- a/__py_struct_from_dict__.cc	Thu May 04 09:41:40 2017 -0700
+++ b/__py_struct_from_dict__.cc	Thu May 04 12:31:07 2017 -0700
@@ -71,7 +71,7 @@
 %!error __py_class_name__ (1, 2)
 */
 
-DEFUN_DLD (__py_int64_scalar_value__, args, nargout,
+DEFUN_DLD (__py_int64_scalar_value__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn {} {} __py_int64_scalar_value__ (@var{x})\n\
 Extract a scalar int64 value from the Python integer @var{x}.\n\
@@ -123,7 +123,7 @@
 %!error __py_int64_scalar_value__ (1, 2)
 */
 
-DEFUN_DLD (__py_uint64_scalar_value__, args, nargout,
+DEFUN_DLD (__py_uint64_scalar_value__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn {} {} __py_uint64_scalar_value__ (@var{x})\n\
 Extract a scalar uint64 value from the Python integer @var{x}.\n\
@@ -174,7 +174,7 @@
 %!error __py_uint64_scalar_value__ (1, 2)
 */
 
-DEFUN_DLD (__py_is_none__, args, nargout,
+DEFUN_DLD (__py_is_none__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn  {} {} __py_is_none__ (@var{x})\n\
 Check whether the Python object @var{obj} is the @code{None} object.\n\
@@ -204,7 +204,7 @@
 %!error __py_is_none__ (1, 2)
 */
 
-DEFUN_DLD (__py_isinstance__, args, nargout,
+DEFUN_DLD (__py_isinstance__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn  {} {} __py_isinstance__ (@var{x})\n\
 Check whether the Python object @var{obj} is an instance of a Python type\n\
@@ -242,7 +242,7 @@
   return retval;
 }
 
-DEFUN_DLD (__py_objstore_del__, args, nargout,
+DEFUN_DLD (__py_objstore_del__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn {} {} __py_objstore_del__ (@var{key})\n\
 Delete the Python object stored under @var{key} from the object store.\n\
@@ -261,7 +261,7 @@
   return ovl ();
 }
 
-DEFUN_DLD (__py_objstore_get__, args, nargout,
+DEFUN_DLD (__py_objstore_get__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn {} {} __py_objstore_get__ (@var{key})\n\
 Get the Python object stored under @var{key} from the object store.\n\
@@ -285,7 +285,7 @@
   return ovl (retval);
 }
 
-DEFUN_DLD (__py_objstore_put__, args, nargout,
+DEFUN_DLD (__py_objstore_put__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn {} {} __py_objstore_put__ (@var{value})\n\
 Convert @var{value} to a Python value and store in the object store.\n\
@@ -308,7 +308,7 @@
   return ovl (octave_uint64 (key));
 }
 
-DEFUN_DLD (__py_string_value__, args, nargout,
+DEFUN_DLD (__py_string_value__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn {} {} __py_string_value__ (@var{obj})\n\
 Return the string value or representation of the Python object @var{obj}.\n\
@@ -343,7 +343,7 @@
   return ovl (str);
 }
 
-DEFUN_DLD (__py_struct_from_dict__, args, nargout,
+DEFUN_DLD (__py_struct_from_dict__, args, ,
            "-*- texinfo -*-\n\
 @deftypefn  {} {} __py_struct_from_dict__ (@var{dict})\n\
 Extract a scalar struct from the Python dict @var{dict}.\n\