octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Java compilation warnings


From: Rik
Subject: Java compilation warnings
Date: Thu, 06 Dec 2012 11:20:25 -0800

12/6/12

All,

There is still quite a bit of work to do in importing the Java package into
core and bringing it up to core standards.  I'm busy trying to improve the
Autotools part of the process.  I'm hoping I can get some help with the
other bits.

For starters, when I compile __java__.cc I get the warnings listed below. 
I think it would be short work for someone to silence most of them by
removing the old-style casts and using C++ style casting.

In file included from dldfcn/__java__.cc:23:
dldfcn/__java__.h: In copy constructor ‘octave_java::octave_java(const
octave_java&)’:
dldfcn/__java__.h:108: warning: base class ‘class octave_base_value’ should
be explicitly initialized in the copy constructor
dldfcn/__java__.h: At global scope:
dldfcn/__java__.h:140: warning: unused parameter ‘pr_as_read_syntax’
dldfcn/__java__.cc: In member function ‘void JVMArgs::update()’:
dldfcn/__java__.cc:145: warning: use of old-style cast
dldfcn/__java__.cc: In function ‘void initialize_jvm()’:
dldfcn/__java__.cc:473: warning: use of old-style cast
dldfcn/__java__.cc:474: warning: use of old-style cast
dldfcn/__java__.cc:495: warning: use of old-style cast
dldfcn/__java__.cc:501: warning: use of old-style cast
dldfcn/__java__.cc:501: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc:503: warning: use of old-style cast
dldfcn/__java__.cc: In function ‘octave_value get_array_elements(JNIEnv*,
_jobject*, const octave_value_list&)’:
dldfcn/__java__.cc:730: warning: use of old-style cast
dldfcn/__java__.cc:730: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In function ‘octave_value set_array_elements(JNIEnv*,
_jobject*, const octave_value_list&, const octave_value&)’:
dldfcn/__java__.cc:752: warning: use of old-style cast
dldfcn/__java__.cc:752: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In function ‘octave_value box(JNIEnv*, _jobject*,
_jclass*)’:
dldfcn/__java__.cc:902: warning: use of old-style cast
dldfcn/__java__.cc:902: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc:931: warning: use of old-style cast
dldfcn/__java__.cc:939: warning: use of old-style cast
dldfcn/__java__.cc:950: warning: use of old-style cast
dldfcn/__java__.cc:958: warning: use of old-style cast
dldfcn/__java__.cc:967: warning: use of old-style cast
dldfcn/__java__.cc:967: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In function ‘int unbox(JNIEnv*, const octave_value&,
jobject_ref&, jclass_ref&)’:
dldfcn/__java__.cc:1116: warning: use of old-style cast
dldfcn/__java__.cc:1116: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc:1136: warning: use of old-style cast
dldfcn/__java__.cc:1145: warning: use of old-style cast
dldfcn/__java__.cc:1154: warning: use of old-style cast
dldfcn/__java__.cc:1180: warning: use of old-style cast
dldfcn/__java__.cc:1180: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In function ‘int java_event_hook()’:
dldfcn/__java__.cc:1245: warning: use of old-style cast
dldfcn/__java__.cc:1245: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: At global scope:
dldfcn/__java__.cc:1274: warning: unused parameter ‘args’
dldfcn/__java__.cc:1287: warning: unused parameter ‘args’
dldfcn/__java__.cc:1597: warning: unused parameter ‘args’
dldfcn/__java__.cc:1641: warning: unused parameter ‘env’
dldfcn/__java__.cc: In static member function ‘static JNIEnv*
octave_java::thread_jni_env()’:
dldfcn/__java__.cc:1734: warning: use of old-style cast
dldfcn/__java__.cc: In member function ‘octave_value
octave_java::do_java_invoke(JNIEnv*, const std::string&, const
octave_value_list&)’:
dldfcn/__java__.cc:1895: warning: use of old-style cast
dldfcn/__java__.cc:1895: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In static member function ‘static octave_value
octave_java::do_java_invoke(JNIEnv*, const std::string&, const
std::string&, const octave_value_list&)’:
dldfcn/__java__.cc:1920: warning: use of old-style cast
dldfcn/__java__.cc:1920: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In static member function ‘static octave_value
octave_java::do_java_create(JNIEnv*, const std::string&, const
octave_value_list&)’:
dldfcn/__java__.cc:1945: warning: use of old-style cast
dldfcn/__java__.cc:1945: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In member function ‘octave_value
octave_java::do_java_get(JNIEnv*, const std::string&)’:
dldfcn/__java__.cc:1966: warning: use of old-style cast
dldfcn/__java__.cc:1966: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In static member function ‘static octave_value
octave_java::do_java_get(JNIEnv*, const std::string&, const std::string&)’:
dldfcn/__java__.cc:1986: warning: use of old-style cast
dldfcn/__java__.cc:1986: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In member function ‘octave_value
octave_java::do_java_set(JNIEnv*, const std::string&, const octave_value&)’:
dldfcn/__java__.cc:2012: warning: use of old-style cast
dldfcn/__java__.cc:2012: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness
dldfcn/__java__.cc: In static member function ‘static octave_value
octave_java::do_java_set(JNIEnv*, const std::string&, const std::string&,
const octave_value&)’:
dldfcn/__java__.cc:2034: warning: use of old-style cast
dldfcn/__java__.cc:2034: warning: cast from type ‘const char*’ to type
‘char*’ casts away constness

--Rik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]