mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 07:23:04 +01:00
Fixed some more warnings
This commit is contained in:
parent
3c564a1c0b
commit
82f1524800
@ -306,6 +306,7 @@ bool SyncObject::wait(SyncType type, ThreadSync* thread, Sync* sync, int timeOut
|
||||
if (thread->lockGranted)
|
||||
return true;
|
||||
|
||||
(void)wakeup;
|
||||
//if (!wakeup)
|
||||
// stalled(thread);
|
||||
|
||||
|
@ -2185,7 +2185,7 @@ static void get_dtype_of_list(const gpre_nod* node, gpre_fld* f)
|
||||
bool all_numeric = true, any_numeric = false, any_approx = false, any_float = false;
|
||||
bool all_text = true, any_text = false, any_varying = false;
|
||||
bool all_date = true, all_time = true, all_timestamp = true, any_datetime = false;
|
||||
bool all_blob = true, any_blob = false, any_text_blob = false;
|
||||
bool all_blob = true, any_text_blob = false;
|
||||
//bool nullable = false;
|
||||
//bool err = false;
|
||||
gpre_fld field_aux;
|
||||
@ -2329,7 +2329,6 @@ static void get_dtype_of_list(const gpre_nod* node, gpre_fld* f)
|
||||
return;
|
||||
}
|
||||
|
||||
any_blob = true;
|
||||
if (field.fld_sub_type == 1)
|
||||
{
|
||||
// Text sub type
|
||||
|
@ -158,7 +158,7 @@ static bool global_first_flag = false;
|
||||
static adl* array_decl_list;
|
||||
|
||||
#if (defined AIX || defined AIX_PPC)
|
||||
const char* const INCLUDE_ISC_FTN = " INCLUDE '%s\' \n\n";
|
||||
const char* const INCLUDE_ISC_FTN = " INCLUDE \'%s\' \n\n";
|
||||
const char* const INCLUDE_FTN_FILE = "gds.f";
|
||||
const char* const DOUBLE_DCL = "DOUBLE PRECISION";
|
||||
const char* const I2CONST_1 = "%VAL(";
|
||||
@ -175,7 +175,7 @@ const char* const COMMENT = "C ";
|
||||
const char* const INLINE_COMMENT = "!";
|
||||
const char* const COMMA = ",";
|
||||
#elif defined(__sun)
|
||||
const char* const INCLUDE_ISC_FTN = " INCLUDE '%s\' \n\n";
|
||||
const char* const INCLUDE_ISC_FTN = " INCLUDE \'%s\' \n\n";
|
||||
const char* const INCLUDE_FTN_FILE = "gds.f";
|
||||
const char* const DOUBLE_DCL = "DOUBLE PRECISION";
|
||||
const char* const I2CONST_1 = "";
|
||||
@ -192,7 +192,7 @@ const char* const COMMENT = "* ";
|
||||
const char* const INLINE_COMMENT = "\n* ";
|
||||
const char* const COMMA = ",";
|
||||
#elif defined(LINUX)
|
||||
const char* const INCLUDE_ISC_FTN = " INCLUDE '/usr/firebird/include/gds.f\' \n\n";
|
||||
const char* const INCLUDE_ISC_FTN = " INCLUDE \'%s\' \n\n";
|
||||
const char* const INCLUDE_FTN_FILE = "gds.f";
|
||||
const char* const DOUBLE_DCL = "DOUBLE PRECISION";
|
||||
const char* const I2CONST_1 = "";
|
||||
@ -226,7 +226,7 @@ const char* const COMMENT = "* ";
|
||||
const char* const INLINE_COMMENT = "\n* ";
|
||||
const char* const COMMA = ",";
|
||||
#elif (defined FREEBSD || defined NETBSD)
|
||||
const char* const INCLUDE_ISC_FTN = " INCLUDE '/usr/firebird/include/gds.f\' \n\n";
|
||||
const char* const INCLUDE_ISC_FTN = " INCLUDE \'%s\' \n\n";
|
||||
const char* const INCLUDE_FTN_FILE = "gds.f";
|
||||
const char* const DOUBLE_DCL = "DOUBLE PRECISION";
|
||||
const char* const I2CONST_1 = "";
|
||||
@ -838,7 +838,7 @@ static void gen_based(const act* action)
|
||||
break;
|
||||
|
||||
case dtype_text:
|
||||
fprintf(gpreGlob.out_file, "%sCHARACTER*%ld%s", COLUMN,
|
||||
fprintf(gpreGlob.out_file, "%sCHARACTER*%"SLONGFORMAT"%s", COLUMN,
|
||||
(based_on->bas_flags & BAS_segment) ? length : ((field->fld_array_info) ?
|
||||
field->fld_array->fld_length : field->fld_length),
|
||||
COLUMN);
|
||||
@ -1202,14 +1202,14 @@ static void gen_create_database(const act* action)
|
||||
|
||||
if (request->req_length || request->req_flags & REQ_extend_dpb)
|
||||
sprintf(output_buffer,
|
||||
"%sCALL ISC_CREATE_DATABASE (%s, %s%d%s, %s'%s'%s, %s, %s%s%s, %s, 0)\n",
|
||||
"%sCALL ISC_CREATE_DATABASE (%s, %s%"SIZEFORMAT"%s, %s'%s'%s, %s, %s%s%s, %s, 0)\n",
|
||||
COLUMN,
|
||||
status_vector(),
|
||||
I2CONST_1, strlen(db->dbb_filename), I2CONST_2,
|
||||
REF_1, db->dbb_filename, REF_2,
|
||||
db->dbb_name->sym_string, I2CONST_1, s1, I2CONST_2, s2);
|
||||
else
|
||||
sprintf(output_buffer, "%sCALL ISC_CREATE_DATABASE (%s, %s%d%s, %s'%s'%s, %s, %s0%s, 0, 0)\n",
|
||||
sprintf(output_buffer, "%sCALL ISC_CREATE_DATABASE (%s, %s%"SIZEFORMAT"%s, %s'%s'%s, %s, %s0%s, 0, 0)\n",
|
||||
COLUMN,
|
||||
status_vector(),
|
||||
I2CONST_1, strlen(db->dbb_filename), I2CONST_2,
|
||||
@ -1599,7 +1599,7 @@ static void gen_drop_database(const act* action)
|
||||
{
|
||||
const gpre_dbb* db = (gpre_dbb*) action->act_object;
|
||||
|
||||
sprintf(output_buffer, "%s CALL ISC_DROP_DATABASE (%s, %s%d%s, %s\'%s\'%s, RDB_K_DB_TYPE_GDS)\n",
|
||||
sprintf(output_buffer, "%s CALL ISC_DROP_DATABASE (%s, %s%"SIZEFORMAT"%s, %s\'%s\'%s, RDB_K_DB_TYPE_GDS)\n",
|
||||
COLUMN,
|
||||
status_vector(),
|
||||
I2_1, strlen(db->dbb_filename), I2_2,
|
||||
|
@ -1101,7 +1101,7 @@ static void gen_based( const act* action)
|
||||
if (strlen(gpreGlob.sw_cob_dformat) == 0)
|
||||
fprintf(gpreGlob.out_file, "%sPIC S9(19)%s", names[COLUMN], USAGE_BINARY8);
|
||||
else
|
||||
fprintf(gpreGlob.out_file, "%sPIC X(%d)", names[COLUMN], strlen(gpreGlob.sw_cob_dformat));
|
||||
fprintf(gpreGlob.out_file, "%sPIC X(%"SIZEFORMAT")", names[COLUMN], strlen(gpreGlob.sw_cob_dformat));
|
||||
break;
|
||||
|
||||
case dtype_sql_date:
|
||||
@ -1109,7 +1109,7 @@ static void gen_based( const act* action)
|
||||
if (strlen(gpreGlob.sw_cob_dformat) == 0)
|
||||
fprintf(gpreGlob.out_file, "%sPIC S9(10)%s", names[COLUMN], USAGE_BINARY4);
|
||||
else
|
||||
fprintf(gpreGlob.out_file, "%sPIC X(%d)", names[COLUMN], strlen(gpreGlob.sw_cob_dformat));
|
||||
fprintf(gpreGlob.out_file, "%sPIC X(%"SIZEFORMAT")", names[COLUMN], strlen(gpreGlob.sw_cob_dformat));
|
||||
break;
|
||||
|
||||
case dtype_blob:
|
||||
@ -1480,7 +1480,7 @@ static void gen_create_database( const act* action)
|
||||
}
|
||||
if (db->dbb_r_user)
|
||||
{
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 28, %s, %d\n",
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 28, %s\n",
|
||||
names[COLUMN],
|
||||
ISC_EXPAND_DPB,
|
||||
s2,
|
||||
@ -1490,7 +1490,7 @@ static void gen_create_database( const act* action)
|
||||
}
|
||||
if (db->dbb_r_password)
|
||||
{
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 29, %s, %d\n",
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 29, %s\n",
|
||||
names[COLUMN],
|
||||
ISC_EXPAND_DPB,
|
||||
s2,
|
||||
@ -1502,7 +1502,7 @@ static void gen_create_database( const act* action)
|
||||
// Process Role Name, isc_dpb_sql_role_name/60
|
||||
if (db->dbb_r_sql_role)
|
||||
{
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 60, %s, %d\n",
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 60, %s\n",
|
||||
names[COLUMN],
|
||||
ISC_EXPAND_DPB,
|
||||
s2,
|
||||
@ -1513,7 +1513,7 @@ static void gen_create_database( const act* action)
|
||||
|
||||
if (db->dbb_r_lc_messages)
|
||||
{
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 47, %s, %d\n",
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 47, %s\n",
|
||||
names[COLUMN],
|
||||
ISC_EXPAND_DPB,
|
||||
s2,
|
||||
@ -1523,7 +1523,7 @@ static void gen_create_database( const act* action)
|
||||
}
|
||||
if (db->dbb_r_lc_ctype)
|
||||
{
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s %s, 48, %s, %d\n",
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s %s, 48, %s\n",
|
||||
names[COLUMN],
|
||||
ISC_EXPAND_DPB,
|
||||
s2,
|
||||
@ -1554,7 +1554,7 @@ static void gen_create_database( const act* action)
|
||||
|
||||
sprintf(dbname, "%s%ddb", names[isc_b_pos], db->dbb_id);
|
||||
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %d%, %s, %s, %s, %s, 0\n",
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %"SIZEFORMAT", %s, %s, %s, %s, 0\n",
|
||||
names[COLUMN],
|
||||
ISC_CREATE_DATABASE,
|
||||
status_vector(action),
|
||||
@ -1716,12 +1716,12 @@ static void gen_database( const act* action)
|
||||
db->dbb_id = ++count;
|
||||
if (db->dbb_runtime)
|
||||
{
|
||||
printa(COLUMN8, false, "01 %s%ddb PIC X(%d) VALUE IS \"%s\".",
|
||||
printa(COLUMN8, false, "01 %s%ddb PIC X(%"SIZEFORMAT") VALUE IS \"%s\".",
|
||||
names[isc_b_pos], db->dbb_id, strlen(db->dbb_runtime), db->dbb_runtime);
|
||||
}
|
||||
else if (db->dbb_filename)
|
||||
{
|
||||
printa(COLUMN8, false, "01 %s%ddb PIC X(%d) VALUE IS \"%s\".",
|
||||
printa(COLUMN8, false, "01 %s%ddb PIC X(%"SIZEFORMAT") VALUE IS \"%s\".",
|
||||
names[isc_b_pos], db->dbb_id, strlen(db->dbb_filename), db->dbb_filename);
|
||||
}
|
||||
|
||||
@ -1756,7 +1756,7 @@ static void gen_database( const act* action)
|
||||
strncpy(fname, s, len);
|
||||
fname[len - 1] = 0;
|
||||
ready->rdy_id = ++count;
|
||||
printa(COLUMN8, false, "01 %s%ddb PIC X(%d) VALUE IS \"%s\".",
|
||||
printa(COLUMN8, false, "01 %s%ddb PIC X(%"SIZEFORMAT") VALUE IS \"%s\".",
|
||||
names[isc_b_pos], ready->rdy_id, strlen(fname), fname);
|
||||
}
|
||||
}
|
||||
@ -1808,7 +1808,7 @@ static void gen_database( const act* action)
|
||||
if (!chck_dups)
|
||||
{
|
||||
make_name(s1, cur_stmt);
|
||||
printa(COLUMN8, false, "01 ISC-CONST-%s PIC X(%d) VALUE IS \"%s \".",
|
||||
printa(COLUMN8, false, "01 ISC-CONST-%s PIC X(%"SIZEFORMAT") VALUE IS \"%s \".",
|
||||
s1, strlen(s1) + 1, s1);
|
||||
printa(COLUMN8, false, "01 ISC-CONST-%sL PIC S9(5) %s.", s1, USAGE_BINARY2);
|
||||
}
|
||||
@ -1827,7 +1827,7 @@ static void gen_database( const act* action)
|
||||
const gpre_prc* procedure = (gpre_prc*) local_act->act_object;
|
||||
const gpre_sym* symbol = procedure->prc_symbol;
|
||||
const char* sname = symbol->sym_string;
|
||||
printa(COLUMN8, false, "01 %s%dprc PIC X(%d) VALUE IS \"%s\".",
|
||||
printa(COLUMN8, false, "01 %s%dprc PIC X(%"SIZEFORMAT") VALUE IS \"%s\".",
|
||||
names[isc_b_pos], request->req_ident, strlen(sname), sname);
|
||||
}
|
||||
}
|
||||
@ -4185,7 +4185,7 @@ static void make_ready(const gpre_dbb* db,
|
||||
// Process Role Name, isc_dpb_sql_role_name/60
|
||||
if (db->dbb_r_sql_role)
|
||||
{
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 60, %s, %d\n",
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 60, %s\n",
|
||||
names[COLUMN],
|
||||
ISC_EXPAND_DPB,
|
||||
s2,
|
||||
@ -4196,7 +4196,7 @@ static void make_ready(const gpre_dbb* db,
|
||||
|
||||
if (db->dbb_r_lc_messages)
|
||||
{
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 47, %s, %d\n",
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s, %s, 47, %s\n",
|
||||
names[COLUMN],
|
||||
ISC_EXPAND_DPB,
|
||||
s2,
|
||||
@ -4206,7 +4206,7 @@ static void make_ready(const gpre_dbb* db,
|
||||
}
|
||||
if (db->dbb_r_lc_ctype)
|
||||
{
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s %s, 48, %s, %d\n",
|
||||
sprintf(output_buffer, "%sCALL \"%s\" USING %s %s, 48, %s\n",
|
||||
names[COLUMN],
|
||||
ISC_EXPAND_DPB,
|
||||
s2,
|
||||
|
@ -2399,7 +2399,6 @@ static act* par_open_blob( act_t act_op, gpre_sym* symbol)
|
||||
|
||||
// See if we need a blob filter (do we have a subtype to subtype clause?)
|
||||
|
||||
bool filter_is_defined = false;
|
||||
for (;;)
|
||||
{
|
||||
if (MSC_match(KW_FILTER))
|
||||
@ -2409,7 +2408,6 @@ static act* par_open_blob( act_t act_op, gpre_sym* symbol)
|
||||
if (!MSC_match(KW_TO))
|
||||
CPR_s_error("TO");
|
||||
blob->blb_const_to_type = PAR_blob_subtype(request->req_database);
|
||||
filter_is_defined = true;
|
||||
}
|
||||
else if (MSC_match(KW_STREAM))
|
||||
blob->blb_type = isc_bpb_type_stream;
|
||||
|
@ -458,7 +458,7 @@ void PATTERN_expand( USHORT column, const TEXT* pattern, PAT* args)
|
||||
#endif
|
||||
|
||||
default:
|
||||
fprintf(gpreGlob.out_file, buffer);
|
||||
fprintf(gpreGlob.out_file, "%s", buffer);
|
||||
break;
|
||||
}
|
||||
#else
|
||||
|
@ -387,10 +387,12 @@ void BackupManager::endBackup(thread_db* tdbb, bool recover)
|
||||
WIN window(HEADER_PAGE_NUMBER);
|
||||
Ods::header_page* header;
|
||||
|
||||
#ifdef NBAK_DEBUG
|
||||
ULONG adjusted_scn; // We use this value to prevent race conditions.
|
||||
// They are possible because we release state lock
|
||||
// for some instants and anything is possible at
|
||||
// that times.
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
@ -422,7 +424,10 @@ void BackupManager::endBackup(thread_db* tdbb, bool recover)
|
||||
|
||||
// Set state in database header
|
||||
backup_state = nbak_state_merge;
|
||||
adjusted_scn = ++current_scn;
|
||||
#ifdef NBAK_DEBUG
|
||||
adjusted_scn =
|
||||
#endif
|
||||
++current_scn;
|
||||
NBAK_TRACE(("New state is getting to become %d", backup_state));
|
||||
CCH_MARK_MUST_WRITE(tdbb, &window);
|
||||
// Generate new SCN
|
||||
|
@ -1049,7 +1049,7 @@ ISC_STATUS Service::query2(thread_db* /*tdbb*/,
|
||||
|
||||
UCHAR item;
|
||||
UCHAR buffer[MAXPATHLEN];
|
||||
USHORT l, length, version, get_flags;
|
||||
USHORT l, length, get_flags;
|
||||
UCHAR* stdin_request_notification = NULL;
|
||||
|
||||
ThreadIdHolder holdId(svc_thread_strings);
|
||||
@ -1092,7 +1092,6 @@ ISC_STATUS Service::query2(thread_db* /*tdbb*/,
|
||||
timeout = (USHORT) gds__vax_integer(items, l);
|
||||
break;
|
||||
case isc_info_svc_version:
|
||||
version = (USHORT) gds__vax_integer(items, l);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1575,7 +1574,7 @@ void Service::query(USHORT send_item_length,
|
||||
|
||||
UCHAR item, *p;
|
||||
UCHAR buffer[256];
|
||||
USHORT l, length, version, get_flags;
|
||||
USHORT l, length, get_flags;
|
||||
|
||||
try
|
||||
{
|
||||
@ -1609,7 +1608,6 @@ void Service::query(USHORT send_item_length,
|
||||
timeout = (USHORT) gds__vax_integer(items, l);
|
||||
break;
|
||||
case isc_info_svc_version:
|
||||
version = (USHORT) gds__vax_integer(items, l);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3545,10 +3545,6 @@ void VIO_verb_cleanup(thread_db* tdbb, jrd_tra* transaction)
|
||||
const bool new_ver = (record->rec_flags & REC_new_version) != 0;
|
||||
if (record->rec_length != 0)
|
||||
{
|
||||
record_param new_rpb = rpb;
|
||||
new_rpb.rpb_record = record;
|
||||
new_rpb.rpb_address = record->rec_data;
|
||||
new_rpb.rpb_length = record->rec_length;
|
||||
verb_post(tdbb, transaction, &rpb, record, same_tx, new_ver);
|
||||
}
|
||||
else if (same_tx) {
|
||||
|
@ -285,8 +285,9 @@ static void ascii_str_to_upper( TEXT* s)
|
||||
|
||||
while (*s)
|
||||
{
|
||||
*s >= 'a' && *s <= 'z' ? *s &= 0xDF : *s;
|
||||
*s++;
|
||||
if (*s >= 'a' && *s <= 'z')
|
||||
*s &= 0xDF;
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3198,7 +3198,7 @@ static qli_syntax* parse_blr( UCHAR** ptr, qli_symbol* symbol)
|
||||
break;
|
||||
|
||||
case blr_fid:
|
||||
BLR_BYTE;
|
||||
(void)BLR_BYTE;
|
||||
blr += 2;
|
||||
node = make_node(nod_field, 1);
|
||||
name = (qli_name*) ALLOCPV(type_nam, symbol->sym_length);
|
||||
@ -3208,7 +3208,7 @@ static qli_syntax* parse_blr( UCHAR** ptr, qli_symbol* symbol)
|
||||
break;
|
||||
|
||||
case blr_field:
|
||||
BLR_BYTE;
|
||||
(void)BLR_BYTE;
|
||||
length = BLR_BYTE;
|
||||
node = make_node(nod_field, 1);
|
||||
name = (qli_name*) ALLOCPV(type_nam, length);
|
||||
|
Loading…
Reference in New Issue
Block a user