Skip to content

Commit afaab74

Browse files
authored
Fix types in trace (#9119)
* Fix loop variable type to avoid potential overflow * add use USHORT for MessageSet fields instead of int * newlines between declarations * Remove redundant comment about MessageSet USHORT range * Remove newline
1 parent e1ddcee commit afaab74

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/jrd/trace/TraceCmdLine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace
6666
struct MessageSet
6767
{
6868
const int range[2];
69-
const std::initializer_list<int> list;
69+
const std::initializer_list<USHORT> list;
7070

7171
void print() const
7272
{

src/jrd/trace/TraceObjects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ TraceRuntimeStats::TraceRuntimeStats(Attachment* attachment,
684684
m_info.pin_tables = m_legacyCounts.begin();
685685
m_info.pin_count = m_legacyCounts.getCount();
686686

687-
for (MetaId i = 0; i < m_info.pin_count; i++)
687+
for (FB_SIZE_T i = 0; i < m_info.pin_count; i++)
688688
{
689689
m_info.pin_tables[i].trc_relation_id = m_tableCounters.getObjectId(i);
690690
m_info.pin_tables[i].trc_relation_name = m_tableCounters.getObjectName(i);

0 commit comments

Comments
 (0)