@@ -151,8 +151,8 @@ static UndoDataRet get_undo_data(thread_db* tdbb, jrd_tra* transaction,
151151static void invalidate_cursor_records (jrd_tra*, record_param*);
152152
153153// flags to pass into list_staying
154- const int LS_ACTIVE_RPB = 0x01 ;
155- const int LS_NO_RESTART = 0x02 ;
154+ inline constexpr int LS_ACTIVE_RPB = 0x01 ;
155+ inline constexpr int LS_NO_RESTART = 0x02 ;
156156
157157static void list_staying (thread_db*, record_param*, RecordStack&, int flags = 0 );
158158static void list_staying_fast (thread_db*, record_param*, RecordStack&, record_param* = NULL , int flags = 0 );
@@ -3229,7 +3229,7 @@ bool VIO_get_current(thread_db* tdbb,
32293229 // Cannot use Arg::Num here because transaction number is 64-bit unsigned integer
32303230 ERR_post (Arg::Gds (isc_rec_in_limbo) << Arg::Int64 (rpb->rpb_transaction_nr ));
32313231 }
3232- // fall thru
3232+ [[fallthrough]];
32333233
32343234 case tra_active:
32353235 // clear lock error from status vector
@@ -3427,7 +3427,7 @@ bool VIO_modify(thread_db* tdbb, record_param* org_rpb, record_param* new_rpb, j
34273427
34283428 if (needDfw (tdbb, transaction))
34293429 {
3430- const SLONG nullLinger = 0 ;
3430+ constexpr SLONG nullLinger = 0 ;
34313431
34323432 switch ((RIDS) relation->rel_id )
34333433 {
@@ -4245,7 +4245,8 @@ void VIO_store(thread_db* tdbb, record_param* rpb, jrd_tra* transaction)
42454245 schemaName = depName.schema .c_str ();
42464246 }
42474247
4248- desc.makeText (strlen (schemaName), CS_METADATA, (UCHAR*) schemaName);
4248+ desc.makeText (static_cast <USHORT>(strlen (schemaName)), CS_METADATA,
4249+ (UCHAR*) schemaName);
42494250
42504251 MOV_move (tdbb, &desc, &schemaDesc);
42514252 rpb->rpb_record ->clearNull (fieldId);
@@ -4296,7 +4297,8 @@ void VIO_store(thread_db* tdbb, record_param* rpb, jrd_tra* transaction)
42964297 case obj_package_body:
42974298 EVL_field (0 , rpb->rpb_record , schemaFieldId, &desc2);
42984299
4299- desc.makeText (strlen (PUBLIC_SCHEMA), CS_METADATA, (UCHAR*) PUBLIC_SCHEMA);
4300+ desc.makeText (static_cast <USHORT>(strlen (PUBLIC_SCHEMA)), CS_METADATA,
4301+ (UCHAR*) PUBLIC_SCHEMA);
43004302
43014303 MOV_move (tdbb, &desc, &desc2);
43024304 rpb->rpb_record ->clearNull (schemaFieldId);
@@ -4956,7 +4958,7 @@ WriteLockResult VIO_writelock(thread_db* tdbb, record_param* org_rpb, jrd_tra* t
49564958 case PrepareResult::DELETED:
49574959 if (skipLocked && (transaction->tra_flags & TRA_read_committed))
49584960 return WriteLockResult::SKIPPED;
4959- // fall thru
4961+ [[fallthrough]];
49604962
49614963 case PrepareResult::CONFLICT:
49624964 if ((transaction->tra_flags & TRA_read_consistency))
@@ -4982,7 +4984,7 @@ WriteLockResult VIO_writelock(thread_db* tdbb, record_param* org_rpb, jrd_tra* t
49824984 fb_assert (skipLocked);
49834985 if (skipLocked)
49844986 return WriteLockResult::SKIPPED;
4985- // fall thru
4987+ [[fallthrough]];
49864988
49874989 case PrepareResult::LOCK_ERROR:
49884990 // We got some kind of locking error (deadlock, timeout or lock_conflict)
@@ -6818,7 +6820,7 @@ static PrepareResult prepare_update(thread_db* tdbb, jrd_tra* transaction, TraNu
68186820 // Cannot use Arg::Num here because transaction number is 64-bit unsigned integer
68196821 ERR_post (Arg::Gds (isc_rec_in_limbo) << Arg::Int64 (rpb->rpb_transaction_nr ));
68206822 }
6821- // fall thru
6823+ [[fallthrough]];
68226824
68236825 case tra_active:
68246826 return skipLocked ? PrepareResult::SKIP_LOCKED : PrepareResult::LOCK_ERROR;
0 commit comments