diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-01 08:40:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-01 11:06:26 +0200 |
commit | 612b489d3e05b24c1b6690082e8518bac033e9d2 (patch) | |
tree | 23a6c556989071385d1c64730ed72bdbae7c239c /connectivity | |
parent | 17e14d459dea201b57be2d8e677fa776ead03291 (diff) |
loplugin:checkunusedparams
the "check for taking address of function" part was generating false+
Change-Id: Iad6203850901229b7b1b2f8938c68ec703cd343f
Reviewed-on: https://gerrit.libreoffice.org/40613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
4 files changed, 29 insertions, 22 deletions
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx index 34e818351c13..e8030b2c0b71 100644 --- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx @@ -143,7 +143,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nati } -jint read_from_storage_stream( JNIEnv * env, jobject /*obj_this*/, jstring name, jstring key ) +jint read_from_storage_stream( JNIEnv * env, jstring name, jstring key ) { std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference< XInputStream>(); @@ -185,7 +185,7 @@ jint read_from_storage_stream( JNIEnv * env, jobject /*obj_this*/, jstring name, * Signature: (Ljava/lang/String;Ljava/lang/String;)I */ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2 - (JNIEnv* env, jobject obj_this, jstring name, jstring key) + (JNIEnv* env, jobject /*obj_this*/, jstring name, jstring key) { #ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); @@ -194,12 +194,12 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ DataLogFile aDataLog( env, name, "data" ); return read_from_storage_stream( env, obj_this, name, key, &aDataLog ); #else - return read_from_storage_stream( env, obj_this, name, key ); + return read_from_storage_stream( env, name, key ); #endif } -jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject /*obj_this*/,jstring name, jstring key, jbyteArray buffer, jint off, jint len ) +jint read_from_storage_stream_into_buffer( JNIEnv * env, jstring name, jstring key, jbyteArray buffer, jint off, jint len ) { #ifdef HSQLDB_DBG { @@ -261,7 +261,8 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ DataLogFile aDataLog( env, name, "data" ); return read_from_storage_stream_into_buffer( env, obj_this, name, key, buffer, off, len, &aDataLog ); #else - return read_from_storage_stream_into_buffer( env, obj_this, name, key, buffer, off, len ); + (void)obj_this; + return read_from_storage_stream_into_buffer( env, name, key, buffer, off, len ); #endif } @@ -401,7 +402,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ } -void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jstring name, jstring key, jbyteArray buffer, jint off, jint len ) +void write_to_storage_stream_from_buffer( JNIEnv* env, jstring name, jstring key, jbyteArray buffer, jint off, jint len ) { std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XOutputStream> xOut = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>(); @@ -455,12 +456,13 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ DataLogFile aDataLog( env, name, "data" ); write_to_storage_stream_from_buffer( env, obj_this, name, key, buffer, off, len, &aDataLog ); #else - write_to_storage_stream_from_buffer( env, obj_this, name, key, buffer, off, len ); + (void)obj_this; + write_to_storage_stream_from_buffer( env, name, key, buffer, off, len ); #endif } -void write_to_storage_stream( JNIEnv* env, jobject /*obj_this*/, jstring name, jstring key, jint v ) +void write_to_storage_stream( JNIEnv* env, jstring name, jstring key, jint v ) { std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XOutputStream> xOut = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>(); @@ -505,9 +507,10 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ aOpLog.logOperation( "writeInt" ); DataLogFile aDataLog( env, name, "data" ); - write_to_storage_stream( env, obj_this, name, key, v, &aDataLog ); + write_to_storage_stream( env, name, key, v, &aDataLog ); #else - write_to_storage_stream( env, obj_this, name, key, v ); + (void)obj_this; + write_to_storage_stream( env, name, key, v ); #endif } diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx index 81f06835d520..70cb184b5cb6 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx @@ -75,7 +75,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora * Signature: (Ljava/lang/String;Ljava/lang/String;)I */ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2 - (JNIEnv * env, jobject obj_this,jstring key, jstring name) + (JNIEnv * env, jobject /*obj_this*/, jstring key, jstring name) { #ifdef HSQLDB_DBG OperationLogFile( env, name, "input" ).logOperation( "read()" ); @@ -83,7 +83,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora DataLogFile aDataLog( env, name, "input" ); return read_from_storage_stream( env, obj_this, name, key, &aDataLog ); #else - return read_from_storage_stream( env, obj_this, name, key ); + return read_from_storage_stream( env, name, key ); #endif } @@ -94,7 +94,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora * Signature: (Ljava/lang/String;Ljava/lang/String;[BII)I */ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2_3BII - (JNIEnv * env, jobject obj_this,jstring key, jstring name, jbyteArray buffer, jint off, jint len) + (JNIEnv * env, jobject obj_this, jstring key, jstring name, jbyteArray buffer, jint off, jint len) { #ifdef HSQLDB_DBG OperationLogFile( env, name, "input" ).logOperation( "read( byte[], int, int )" ); @@ -102,7 +102,8 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora DataLogFile aDataLog( env, name, "input" ); return read_from_storage_stream_into_buffer( env, obj_this, name, key, buffer, off, len, &aDataLog ); #else - return read_from_storage_stream_into_buffer(env,obj_this,name,key,buffer,off,len); + (void)obj_this; + return read_from_storage_stream_into_buffer(env, name,key,buffer,off,len); #endif } diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx index 67e066adee05..ad551ccce06c 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx @@ -79,7 +79,8 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora DataLogFile aDataLog( env, name, "output" ); write_to_storage_stream_from_buffer( env, obj_this, name, key, buffer, off, len, &aDataLog ); #else - write_to_storage_stream_from_buffer( env, obj_this, name, key, buffer, off, len ); + (void)obj_this; + write_to_storage_stream_from_buffer( env, name, key, buffer, off, len ); #endif } @@ -97,7 +98,8 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora DataLogFile aDataLog( env, name, "output" ); write_to_storage_stream_from_buffer( env, obj_this, name, key, buffer, 0, env->GetArrayLength( buffer ), &aDataLog ); #else - write_to_storage_stream_from_buffer( env, obj_this, name, key, buffer, 0, env->GetArrayLength( buffer ) ); + (void)obj_this; + write_to_storage_stream_from_buffer( env, name, key, buffer, 0, env->GetArrayLength( buffer ) ); #endif } @@ -145,9 +147,10 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora OperationLogFile( env, name, "output" ).logOperation( "write( int )" ); DataLogFile aDataLog( env, name, "output" ); - write_to_storage_stream( env, obj_this, name, key, b, &aDataLog ); + write_to_storage_stream( env, name, key, b, &aDataLog ); #else - write_to_storage_stream( env, obj_this, name, key, b ); + (void)obj_this; + write_to_storage_stream( env, name, key, b ); #endif } diff --git a/connectivity/source/inc/hsqldb/HStorageAccess.hxx b/connectivity/source/inc/hsqldb/HStorageAccess.hxx index 7fe654119976..c0ae65541530 100644 --- a/connectivity/source/inc/hsqldb/HStorageAccess.hxx +++ b/connectivity/source/inc/hsqldb/HStorageAccess.hxx @@ -29,10 +29,10 @@ namespace connectivity { namespace hsqldb class DataLogFile; } } -jint read_from_storage_stream( JNIEnv * env, jobject obj_this, jstring name, jstring key ); -jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len ); -void write_to_storage_stream_from_buffer( JNIEnv* env, jobject obj_this, jstring name, jstring key, jbyteArray buffer, jint off, jint len ); -void write_to_storage_stream( JNIEnv* env, jobject obj_this, jstring name, jstring key, jint v ); +jint read_from_storage_stream( JNIEnv * env, jstring name, jstring key ); +jint read_from_storage_stream_into_buffer( JNIEnv * env, jstring name, jstring key, jbyteArray buffer, jint off, jint len ); +void write_to_storage_stream_from_buffer( JNIEnv* env, jstring name, jstring key, jbyteArray buffer, jint off, jint len ); +void write_to_storage_stream( JNIEnv* env, jstring name, jstring key, jint v ); #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HSTORAGEACCESS_HXX |