Skip to content

Error when building with U64 Fw Types #3529

@jwest115

Description

@jwest115
F´ Version
Affected Component

Problem Description

Tried building Ref deployment after changing config/FpConfig.fpp's FwEventIdType to U64 and received the following error:

Svc/ActiveLogger/ActiveLoggerImpl.cpp:189:57: error: implicit conversion loses integer precision: 'FwEventIdType' (aka 'unsigned long long') to 'U32' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
  189 |                 this->log_ACTIVITY_HI_ID_FILTER_ENABLED(this->m_filteredIDs[entry]);
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

If I try a smaller type (such as U16), I get different errors (example below is not the complete list):

Svc/AssertFatalAdapter/AssertFatalAdapterComponentAc.cpp:292:29: error: implicit conversion loses integer precision: 'U32' (aka 'unsigned int') to 'FwEventIdType' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion]
  292 |     _id = this->getIdBase() + EVENTID_AF_ASSERT_0;
      |         ~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
Svc/AssertFatalAdapter/AssertFatalAdapterComponentAc.cpp:398:29: error: implicit conversion loses integer precision: 'U32' (aka 'unsigned int') to 'FwEventIdType' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion]
  398 |     _id = this->getIdBase() + EVENTID_AF_ASSERT_1;

Context / Environment

Execute fprime-util version-check and share the output.

Operating System: Darwin
CPU Architecture: arm64
Platform: macOS-15.4-arm64-arm-64bit
Python version: 3.9.21
CMake version: 3.26.3
Pip version: 24.3.1
Pip packages:
    fprime-tools==3.6.1
    fprime-gds (Running with dev version I am testing)
    fprime-fpp-* (Running with dev version I am testing https://github.com/jwest115/fpp/tree/fw-types-in-dict)

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions