Skip to content

Commit

Permalink
debug: remove changes for unused
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-hx committed Dec 20, 2024
1 parent 50df9f5 commit f8e88f0
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 33 deletions.
1 change: 0 additions & 1 deletion cpp/lib/ResultSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class ResultSet
*/
virtual SF_STATUS STDCALL appendChunk(void* chunkPtr)
{
UNUSED(chunkPtr);
return SF_STATUS_ERROR_GENERAL;
}

Expand Down
4 changes: 0 additions & 4 deletions cpp/lib/ResultSetPutGet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ SF_STATUS STDCALL ResultSetPutGet::next()

SF_STATUS STDCALL ResultSetPutGet::getCellAsBool(size_t idx, sf_bool * out_data)
{
UNUSED(idx);
UNUSED(out_data);
setError(SF_STATUS_ERROR_CONVERSION_FAILURE,
"Value cannot be converted to boolean.");
return SF_STATUS_ERROR_CONVERSION_FAILURE;
Expand Down Expand Up @@ -306,8 +304,6 @@ SF_STATUS STDCALL ResultSetPutGet::getCellAsConstString(size_t idx, const char *

SF_STATUS STDCALL ResultSetPutGet::getCellAsTimestamp(size_t idx, SF_TIMESTAMP * out_data)
{
UNUSED(idx);
UNUSED(out_data);
setError(SF_STATUS_ERROR_CONVERSION_FAILURE,
"Value cannot be converted to timestamp.");
return SF_STATUS_ERROR_CONVERSION_FAILURE;
Expand Down
3 changes: 0 additions & 3 deletions include/snowflake/BindUploader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <chrono>
#include <snowflake/Exceptions.hpp>
#include "client.h"
#include "client_int.h"

namespace Snowflake
{
Expand Down Expand Up @@ -115,7 +114,6 @@ class BindUploader
virtual std::string convertTimestampFormat(const std::string& timestampInNano,
SF_DB_TYPE type)
{
UNUSED(type);
return timestampInNano;
}

Expand Down Expand Up @@ -145,7 +143,6 @@ class BindUploader
virtual std::string revertTimestampFormat(const std::string& Formatedtimestamp,
SF_DB_TYPE type)
{
UNUSED(type);
return Formatedtimestamp;
}

Expand Down
7 changes: 0 additions & 7 deletions lib/client_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@
#define DATE_STRING_MAX_SIZE 12
#define SECONDS_IN_AN_HOUR 86400L

// Defined for unused function parameters.
#ifdef _MSC_VER
#define UNUSED(...) (__VA_ARGS__)
#else
#define UNUSED(...)
#endif

/**
* Maximum one-directional range of offset-based timezones (24 hours)
*/
Expand Down
1 change: 0 additions & 1 deletion lib/result_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "snowflake/client.h"
#include "connection.h"
#include "client_int.h"

#ifdef __cplusplus
extern "C" {
Expand Down
3 changes: 0 additions & 3 deletions tests/test_bind_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#define INPUT_ARRAY_SIZE 3

void test_bind_parameters(void **unused) {
UNUSED(unused);
/* init */
SF_STATUS status;
SF_BIND_INPUT input_array[INPUT_ARRAY_SIZE];
Expand Down Expand Up @@ -292,12 +291,10 @@ void test_array_binding_core(unsigned int array_size) {
}

void test_array_binding_normal(void** unused) {
UNUSED(unused);
test_array_binding_core(1000);
}

void test_array_binding_stage(void** unused) {
UNUSED(unused);
test_array_binding_core(100000);
}

Expand Down
7 changes: 0 additions & 7 deletions tests/test_multiple_statements.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

void test_multi_stmt_transaction(void **unused)
{
UNUSED(unused);
SF_CONNECT *sf = setup_snowflake_connection();
SF_STATUS status = snowflake_connect(sf);
if (status != SF_STATUS_SUCCESS) {
Expand Down Expand Up @@ -77,7 +76,6 @@ void test_multi_stmt_transaction(void **unused)

void test_multi_stmt_transaction_rollback(void **unused)
{
UNUSED(unused);
SF_CONNECT *sf = setup_snowflake_connection();
SF_STATUS status = snowflake_connect(sf);
if (status != SF_STATUS_SUCCESS) {
Expand Down Expand Up @@ -148,7 +146,6 @@ void test_multi_stmt_transaction_rollback(void **unused)

void test_multi_stmt_with_large_result(void **unused)
{
UNUSED(unused);
const int rownum = 100000;
SF_CONNECT *sf = setup_snowflake_connection();

Expand Down Expand Up @@ -267,31 +264,27 @@ sf_bool test_multi_stmt_core(sf_bool use_session_param, int count)

void test_multi_stmt_count_session_param_off(void** unused)
{
UNUSED(unused);
// disable multiple statements by setting session parameter to 1
// the query is expected to fail
assert_int_equal(test_multi_stmt_core(SF_BOOLEAN_TRUE, 1), SF_BOOLEAN_FALSE);
}

void test_multi_stmt_count_session_param_on(void** unused)
{
UNUSED(unused);
// enable multiple statements by setting session parameter to 0
// the query should work
assert_int_equal(test_multi_stmt_core(SF_BOOLEAN_TRUE, 0), SF_BOOLEAN_TRUE);
}

void test_multi_stmt_count_stmt_attr_match(void** unused)
{
UNUSED(unused);
// set statement attribute with match number
// the query should work
assert_int_equal(test_multi_stmt_core(SF_BOOLEAN_FALSE, 3), SF_BOOLEAN_TRUE);
}

void test_multi_stmt_count_stmt_attr_mismatch(void** unused)
{
UNUSED(unused);
// set statement attribute with mismatch number
// the query is expected to fail
assert_int_equal(test_multi_stmt_core(SF_BOOLEAN_FALSE, 2), SF_BOOLEAN_FALSE);
Expand Down
7 changes: 0 additions & 7 deletions tests/utils/test_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ extern "C" {
} \
}

// Defined for unused function parameters.
#ifdef _MSC_VER
#define UNUSED(...) (__VA_ARGS__)
#else
#define UNUSED(...)
#endif

void initialize_test(sf_bool debug);

SF_STATUS STDCALL enable_arrow_force(SF_CONNECT *sf);
Expand Down

0 comments on commit f8e88f0

Please sign in to comment.