Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-25212] remove warning messages from compilation #4933

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/base/ddl_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ logddl_make_copy_filename (T_APP_NAME app_name, const char *file_full_path, char
const char *name_tmp = NULL;
int retval = 0;

if (file_full_path == NULL || copy_filename == NULL || buf_size < 0)
if (file_full_path == NULL || copy_filename == NULL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to remove the buf_size argument and specify PATH_MAX directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the buf_size parameter should be kept. The reason is that the size of the string can change.

{
return -1;
}
Expand Down Expand Up @@ -658,7 +658,7 @@ logddl_make_copy_dir (T_APP_NAME app_name, char *copy_filename, char *copy_fullp
const char *env_root = NULL;
int retval = 0;

if (copy_filename == NULL || copy_fullpath == NULL || buf_size < 0)
if (copy_filename == NULL || copy_fullpath == NULL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to remove the buf_size argument and specify PATH_MAX directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the buf_size parameter should be kept. The reason is that the size of the string can change.

{
return -1;
}
Expand Down Expand Up @@ -883,7 +883,7 @@ logddl_write_tran_str (const char *fmt, ...)
len = DDL_LOG_BUFFER_SIZE;
}

if (len < 0 || fwrite (msg, sizeof (char), len, fp) != len)
if (len < 0 || fwrite (msg, sizeof (char), len, fp) != (size_t) len)
{
goto write_error;
}
Expand Down
2 changes: 1 addition & 1 deletion src/base/event_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ event_file_open (const char *path)
static FILE *
event_file_backup (FILE * fp, const char *path)
{
char backup_file[PATH_MAX];
char backup_file[PATH_MAX + 10];

assert (fp != NULL);
assert (path != NULL);
Expand Down
4 changes: 2 additions & 2 deletions src/base/ini_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ static INI_LINE_STATUS
ini_parse_line (char *input_line, char *section, char *key, char *value)
{
INI_LINE_STATUS status;
char line[INI_BUFSIZ + 1];
char line[INI_BUFSIZ + 4];
int len;

strcpy (line, ini_str_trim (input_line));
Expand All @@ -515,7 +515,7 @@ ini_parse_line (char *input_line, char *section, char *key, char *value)
leading_char = section[0];
if (leading_char == '@' || leading_char == '%')
{
sprintf (section, "%c%s", leading_char, ini_str_trim (section + 1));
snprintf (section, INI_BUFSIZ + 2, "%c%s", leading_char, ini_str_trim (section + 1));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The size of the section is (INI_BUFSIZ + 1).

}

if (leading_char != '@')
Expand Down
2 changes: 2 additions & 0 deletions src/base/object_representation.h
Original file line number Diff line number Diff line change
Expand Up @@ -2684,6 +2684,8 @@ or_get_oid (OR_BUF * buf, OID * oid)
{
ASSERT_ALIGN (buf->ptr, INT_ALIGNMENT);

OID_SET_NULL (oid);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved to the then part of the if statement below because setting the oid fields is done in else part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I aggree.


if ((buf->ptr + OR_OID_SIZE) > buf->endptr)
{
return or_underflow (buf);
Expand Down
10 changes: 5 additions & 5 deletions src/base/object_representation_sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,7 @@ or_get_current_representation (RECDES * record, int do_indexes)
sizeof (OR_ATTRIBUTE) * rep->n_attributes);
goto error_cleanup;
}
memset (rep->attributes, 0, sizeof (OR_ATTRIBUTE) * rep->n_attributes);
memset ((void *) rep->attributes, 0, sizeof (OR_ATTRIBUTE) * rep->n_attributes);
}

if (rep->n_shared_attrs > 0)
Expand All @@ -2454,7 +2454,7 @@ or_get_current_representation (RECDES * record, int do_indexes)
sizeof (OR_ATTRIBUTE) * rep->n_shared_attrs);
goto error_cleanup;
}
memset (rep->shared_attrs, 0, sizeof (OR_ATTRIBUTE) * rep->n_shared_attrs);
memset ((void *) rep->shared_attrs, 0, sizeof (OR_ATTRIBUTE) * rep->n_shared_attrs);
}

if (rep->n_class_attrs > 0)
Expand All @@ -2466,7 +2466,7 @@ or_get_current_representation (RECDES * record, int do_indexes)
sizeof (OR_ATTRIBUTE) * rep->n_class_attrs);
goto error_cleanup;
}
memset (rep->class_attrs, 0, sizeof (OR_ATTRIBUTE) * rep->n_class_attrs);
memset ((void *) rep->class_attrs, 0, sizeof (OR_ATTRIBUTE) * rep->n_class_attrs);
}


Expand Down Expand Up @@ -3015,7 +3015,7 @@ or_get_old_representation (RECDES * record, int repid, int do_indexes)
free_and_init (rep);
return NULL;
}
memset (rep->attributes, 0, sizeof (OR_ATTRIBUTE) * rep->n_attributes);
memset ((void *) rep->attributes, 0, sizeof (OR_ATTRIBUTE) * rep->n_attributes);

/* Calculate the beginning of the set_of(rep_attribute) in the representation object. Assume that the start of the
* disk_rep points directly at the the substructure's variable offset table (which it does) and use
Expand Down Expand Up @@ -3214,7 +3214,7 @@ or_get_all_representation (RECDES * record, bool do_indexes, int *count)
(sizeof (OR_ATTRIBUTE) * rep->n_attributes));
goto error;
}
memset (rep->attributes, 0, sizeof (OR_ATTRIBUTE) * rep->n_attributes);
memset ((void *) rep->attributes, 0, sizeof (OR_ATTRIBUTE) * rep->n_attributes);

/* Calculate the beginning of the set_of(rep_attribute) in the representation object. Assume that the start of
* the disk_rep points directly at the the substructure's variable offset table (which it does) and use
Expand Down
3 changes: 1 addition & 2 deletions src/base/xserver_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ extern bool logtb_has_updated (THREAD_ENTRY * thread_p);


extern BTID *xbtree_add_index (THREAD_ENTRY * thread_p, BTID * btid, TP_DOMAIN * key_type, OID * class_oid, int attr_id,
int unique_pk, long long num_oids, long long num_nulls, long long num_keys,
int deduplicate_key_pos);
int unique_pk, INT64 num_oids, INT64 num_nulls, INT64 num_keys, int deduplicate_key_pos);
extern BTID *xbtree_load_index (THREAD_ENTRY * thread_p, BTID * btid, const char *bt_name, TP_DOMAIN * key_type,
OID * class_oids, int n_classes, int n_attrs, int *attr_ids, int *attrs_prefix_length,
HFID * hfids, int unique_pk, int not_null_flag, OID * fk_refcls_oid,
Expand Down
1 change: 1 addition & 0 deletions src/compat/dbtype_function.i
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ db_get_bit (const DB_VALUE * value, int *length)

if (value->domain.general_info.is_null)
{
*length = 0;
return NULL;
}

Expand Down
3 changes: 2 additions & 1 deletion src/connection/host_lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ is_valid_ip (char *ip_addr)
dot++;
}
}
while (token = strtok_r (NULL, delim, &save_ptr_strtok));
while ((token = strtok_r (NULL, delim, &save_ptr_strtok)) != NULL);

if (dot != NUM_IPADDR_DOT)
{
goto err_phase;
Expand Down
2 changes: 1 addition & 1 deletion src/executables/compactdb_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ get_class_mops_from_file (const char *input_filename, MOP ** class_list, int *nu
goto end;
}

strncpy (class_names[i], buffer, len);
strncpy (class_names[i], buffer, len + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to copy with a size of "len+1"?
If you decide to modify it anyway, I recommend doing it as follows.

memcpy (class_names[i], buffer, len);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 is necessary because class_names[i] must end with a terminating zero. Isn't it?
Note that len is strlen(buffer).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hyunikn
In the code, '\0' is filled with the substitution statement immediately below.
class_names[i][len] = 0;

class_names[i][len] = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/executables/csql.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ char csql_Scratch_text[SCRATCH_TEXT_LEN];
int csql_Error_code = NO_ERROR;

static char csql_Prompt[100];
static char csql_Prompt_offline[100];
static char csql_Prompt_offline[101];
Copy link
Contributor

@airnet73 airnet73 Feb 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "snprintf (csql_Prompt_offline, sizeof (csql_Prompt_offline) - 1, "!%s", csql_Prompt);" is better than "csql_Prompt_offline[101]". (line 2772)

static char csql_Name[100];

/*
Expand Down
4 changes: 2 additions & 2 deletions src/executables/unittests_snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ logtb_tran_btid_hash_cmp_func (const void *key1, const void *key2)
static void
logtb_initialize_tdes_for_mvcc_testing (LOG_TDES * tdes, int tran_index)
{
memset (tdes, 0, sizeof (LOG_TDES));
memset ((void *) tdes, 0, sizeof (LOG_TDES));
tdes->tran_index = tran_index;
tdes->trid = NULL_TRANID;

Expand Down Expand Up @@ -157,7 +157,7 @@ logtb_initialize_mvcc_testing (int num_threads, THREAD_ENTRY ** thread_array)
error_code = ER_OUT_OF_VIRTUAL_MEMORY;
goto error;
}
memset (*thread_array, 0, size);
memset ((void *) *thread_array, 0, size);
for (i = 0; i < num_threads; i++)
{
thread_p = *thread_array + i;
Expand Down
4 changes: 2 additions & 2 deletions src/executables/unload_schema.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ emit_query_specs (extract_context & ctxt, print_output & output_ctx, DB_OBJLIST
null_spec = pt_print_query_spec_no_list (parser, *query_ptr);
SPLIT_USER_SPECIFIED_NAME (name, owner_name, class_name);

PRINT_OWNER_NAME (output_owner, (ctxt.is_dba_user || ctxt.is_dba_group_member), output_owner,
PRINT_OWNER_NAME (owner_name, (ctxt.is_dba_user || ctxt.is_dba_group_member), output_owner,
sizeof (output_owner));

output_ctx ("ALTER VCLASS %s%s%s%s ADD QUERY %s ; \n", output_owner,
Expand Down Expand Up @@ -3503,7 +3503,7 @@ emit_index_def (extract_context & ctxt, print_output & output_ctx, DB_OBJECT * c
assert ((constraint->index_status == SM_ONLINE_INDEX_BUILDING_IN_PROGRESS)
|| (ctype != DB_CONSTRAINT_UNIQUE && ctype != DB_CONSTRAINT_REVERSE_UNIQUE));

if ((reserved_col_buf[0] == '\0') && !SM_IS_CONSTRAINT_UNIQUE_FAMILY (ctype))
if ((reserved_col_buf[0] == '\0') && !DB_IS_CONSTRAINT_UNIQUE_FAMILY (ctype))
{
dk_print_deduplicate_key_info (reserved_col_buf, sizeof (reserved_col_buf), DEDUPLICATE_KEY_LEVEL_OFF);
}
Expand Down
2 changes: 1 addition & 1 deletion src/method/method_struct_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ namespace cubmethod
fprintf (stdout, "tuple_count: %d\n", tuple_count);
fprintf (stdout, "ins_oid (%d, %d, %d)\n", ins_oid.pageid, ins_oid.slotid, ins_oid.volid);
fprintf (stdout, "include_oid: %d\n", include_oid);
fprintf (stdout, "query_id: %lld\n", query_id);
fprintf (stdout, "query_id: %ud\n", (unsigned int)query_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query_id is of type UINTPTR.
This is defined differently depending on define.
Therefore, if you do it like below, you will be able to see the warning again even if the type changes in the future.

fprintf (stdout, "query_id: %ud\n", query_id);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It must be %u rather than %ud.
Note that the following code prints '123d'

#include <stdio.h>

int
main() {
    printf("%ud\n", 123);
}

}

void
Expand Down
2 changes: 1 addition & 1 deletion src/method/query_method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ method_dispatch_internal (packing_unpacker &unpacker)
uint64_t id;
std::vector <int> handlers;
unpacker.unpack_all (id, handlers);
for (int i = 0; i < handlers.size (); i++)
for (int i = 0; i < (int)handlers.size (); i++)
{
cubmethod::get_callback_handler()->free_query_handle (handlers[i], false);
}
Expand Down
10 changes: 5 additions & 5 deletions src/monitor/monitor_vacuum_ovfp_threshold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,24 +519,24 @@ ovfp_threshold_mgr::print (THREAD_ENTRY *thread_p, FILE *outfp, const INDEX_OVFP
assert (class_name != NULL && index_name != NULL);
if (class_name)
{
fprintf (outfp, " %-*s", MAX (attr_lengths[0], strlen (class_name)), class_name);
fprintf (outfp, " %-*s", MAX (attr_lengths[0], (int)strlen (class_name)), class_name);
free_and_init (class_name);
}
if (index_name)
{
fprintf (outfp, " %-*s", MAX (attr_lengths[1], strlen (index_name)), index_name);
fprintf (outfp, " %-*s", MAX (attr_lengths[1], (int)strlen (index_name)), index_name);
free_and_init (index_name);
}

fprintf (outfp, " %*lld", attr_lengths[2], (long long) pt->hit_cnt);
fprintf (outfp, " %*ld", attr_lengths[2], pt->hit_cnt);

sprintf (line_buf, " %d (%s)", pt->read_pages[RECENT_POS], time_to_string (pt->event_time[RECENT_POS], time_buf,
sizeof (time_buf)));
fprintf (outfp, " %-*s", MAX (attr_lengths[3], strlen (line_buf)), line_buf);
fprintf (outfp, " %-*s", MAX (attr_lengths[3], (int)strlen (line_buf)), line_buf);

sprintf (line_buf, " %d (%s)", pt->read_pages[MAX_POS], time_to_string (pt->event_time[MAX_POS], time_buf,
sizeof (time_buf)));
fprintf (outfp, " %-*s\n", MAX (attr_lengths[4], strlen (line_buf)), line_buf);
fprintf (outfp, " %-*s\n", MAX (attr_lengths[4], (int)strlen (line_buf)), line_buf);

pt = pt->next;
}
Expand Down
4 changes: 2 additions & 2 deletions src/object/class_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -4184,7 +4184,7 @@ classobj_find_constraint_by_attrs (SM_CLASS_CONSTRAINT * cons_list, DB_CONSTRAIN
}
}

is_uk_new = SM_IS_CONSTRAINT_UNIQUE_FAMILY (new_cons);
is_uk_new = DB_IS_CONSTRAINT_UNIQUE_FAMILY (new_cons);

for (cons = cons_list; cons; cons = cons->next)
{
Expand Down Expand Up @@ -8171,7 +8171,7 @@ classobj_check_index_compatibility (SM_CLASS_CONSTRAINT * constraints, const DB_
{
return SM_CREATE_NEW_INDEX;
}
else if (existing_con->type == SM_CONSTRAINT_INDEX || existing_con->type == DB_CONSTRAINT_REVERSE_INDEX)
else if (existing_con->type == SM_CONSTRAINT_INDEX || existing_con->type == SM_CONSTRAINT_REVERSE_INDEX)
{
return SM_SHARE_INDEX;
}
Expand Down
2 changes: 1 addition & 1 deletion src/object/deduplicate_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ dk_get_deduplicate_key_value (OID * rec_oid, int att_id, DB_VALUE * value)
bool is_test_for_developer = false;
if (is_test_for_developer)
{
#define OID_2_BIGINT(oidptr) (((oidptr)->volid << 48) | ((oidptr)->pageid << 16) | (oidptr)->slotid)
#define OID_2_BIGINT(oidptr) (((int64_t)((oidptr)->volid) << 48) | ((oidptr)->pageid << 16) | (oidptr)->slotid)
assert (CALC_MOD_VALUE_FROM_LEVEL (level) <= SHRT_MAX);
db_make_short (value, (short) (OID_2_BIGINT (rec_oid) % CALC_MOD_VALUE_FROM_LEVEL (level)));

Expand Down
2 changes: 1 addition & 1 deletion src/object/object_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -11518,7 +11518,7 @@ tp_value_auto_cast_with_precision_check (const DB_VALUE * src, DB_VALUE * dest,
/* if the numeric's precision is 19 or more, then it can get the bigint enough */
if (desired_domain->type->id == DB_TYPE_NUMERIC && desired_domain->precision < 19)
{
INT64 bigint;
INT64 bigint = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved to the default branch of the switch statement below because this is overwritten in other branches.


assert (desired_domain->precision >= 0);

Expand Down
4 changes: 2 additions & 2 deletions src/object/object_primitive.c
Original file line number Diff line number Diff line change
Expand Up @@ -3568,7 +3568,7 @@ static int
mr_data_readval_utime (OR_BUF * buf, DB_VALUE * value, TP_DOMAIN * domain, int size, bool copy, char *copy_buf,
int copy_buf_len)
{
DB_UTIME utm;
DB_UTIME utm = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definition should be moved to the else branch of the if statement below because utm is used only in that branch.

int rc = NO_ERROR;

if (value == NULL)
Expand All @@ -3591,7 +3591,7 @@ static int
mr_data_readval_timestampltz (OR_BUF * buf, DB_VALUE * value, TP_DOMAIN * domain, int size, bool copy, char *copy_buf,
int copy_buf_len)
{
DB_UTIME utm;
DB_UTIME utm = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definition should be moved to the else branch of the if statement below because utm is used only in that branch.

int rc = NO_ERROR;

if (value == NULL)
Expand Down
4 changes: 2 additions & 2 deletions src/parser/keyword.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ verify_test (bool is_keywords, KEYWORDS_TABLE_SRCH_INFO & info)
assert (strcasecmp (pk->keyword, keywords[i].keyword) == 0);
}

for (i = 0; i < sizeof (functions) / sizeof (functions[0]); i++)
for (i = 0; i < (int) (sizeof (functions) / sizeof (functions[0])); i++)
{
pk = pt_find_keyword (functions[i].keyword);
if (pk)
Expand All @@ -840,7 +840,7 @@ verify_test (bool is_keywords, KEYWORDS_TABLE_SRCH_INFO & info)
assert (strcasecmp (pf->keyword, functions[i].keyword) == 0);
}

for (i = 0; i < sizeof (keywords) / sizeof (keywords[0]); i++)
for (i = 0; i < (int) (sizeof (keywords) / sizeof (keywords[0])); i++)
{
pf = pt_find_function_name (keywords[i].keyword);
if (pf)
Expand Down
2 changes: 1 addition & 1 deletion src/parser/parser_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -11607,7 +11607,7 @@ pt_convert_dblink_dml_query (PARSER_CONTEXT * parser, PT_NODE * node,
PT_NODE *list = NULL; /* for insert select list */
PT_NODE *spec, *into_spec = NULL, *upd_spec = NULL, *server;

PARSER_VARCHAR *comment, *dml;
PARSER_VARCHAR *comment = NULL, *dml;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This NULL assignment should be moved to the default branch of the switch statement at line 11726 because in other branches the assignment is overwritten.


switch (node->node_type)
{
Expand Down
4 changes: 3 additions & 1 deletion src/parser/type_checking.c
Original file line number Diff line number Diff line change
Expand Up @@ -7814,6 +7814,7 @@ pt_fold_constants_pre (PARSER_CONTEXT * parser, PT_NODE * node, void *arg, int *
// we want to test full execution of sub-tree; don't fold it!
*continue_walk = PT_LIST_WALK;
}
[[fallthrough]];
case PT_EXPR:
if (pt_is_dblink_related (node))
{
Expand Down Expand Up @@ -17208,6 +17209,7 @@ pt_evaluate_db_value_expr (PARSER_CONTEXT * parser, PT_NODE * expr, PT_OP_TYPE o
cmp = 1;
break;
}
[[fallthrough]];
case PT_NE_ALL:
cmp = set_issome (arg1, db_get_set (arg2), PT_EQ_SOME, 1);
if (cmp == 1)
Expand Down Expand Up @@ -17738,7 +17740,7 @@ pt_is_dblink_related (PT_NODE * p)
static PT_NODE *
pt_fold_const_expr (PARSER_CONTEXT * parser, PT_NODE * expr, void *arg)
{
PT_TYPE_ENUM type1, type2 = PT_TYPE_NONE, type3, result_type;
PT_TYPE_ENUM type1, type2 = PT_TYPE_NONE, type3 = PT_TYPE_NONE, result_type;
PT_NODE *opd1 = NULL, *opd2 = NULL, *opd3 = NULL, *result = NULL;
DB_VALUE dummy, dbval_res, *arg1, *arg2, *arg3;
PT_OP_TYPE op;
Expand Down
1 change: 1 addition & 0 deletions src/parser/view_transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -3514,6 +3514,7 @@ pt_check_pushable_subquery_select_list (PARSER_CONTEXT * parser, PT_NODE * query
cinfo.method_found = true;
break;
}
[[fallthrough]];

default: /* do traverse */
parser_walk_leaves (parser, list, pt_check_pushable, &cinfo, NULL, NULL);
Expand Down
2 changes: 1 addition & 1 deletion src/query/crypt_opfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ crypt_default_decrypt (THREAD_ENTRY * thread_p, const char *src, int src_len, co
char **dest_p, int *dest_len_p, CIPHER_ENCRYPTION_TYPE enc_type)
{
char *dest = NULL;
int dest_len;
int dest_len = 0;
int error_status = NO_ERROR;
int pad, pad_len;
int i;
Expand Down
5 changes: 3 additions & 2 deletions src/query/dblink_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ print_utype_to_string (int type)
static int
dblink_make_cci_value (DB_VALUE * cci_value, T_CCI_U_TYPE utype, void *val, int prec, int len, int codeset)
{
int error;
int error = NO_ERROR;

switch (utype)
{
Expand Down Expand Up @@ -393,7 +393,7 @@ dblink_bind_param (int stmt_handle, VAL_DESCR * vd, DBLINK_HOST_VARS * host_vars
DB_TIME time;
T_CCI_DATE cci_date;
T_CCI_BIT cci_bit;
int num_size;
int num_size = 0;
char num_str[40];

unsigned char type;
Expand Down Expand Up @@ -523,6 +523,7 @@ dblink_bind_param (int stmt_handle, VAL_DESCR * vd, DBLINK_HOST_VARS * host_vars
break;
case DB_TYPE_NULL:
value = NULL;
a_type = CCI_A_TYPE_STR;
u_type = CCI_U_TYPE_NULL;
break;
default:
Expand Down
Loading
Loading