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

Posix Implementation of Raw Time Missing Cast #3070

Closed
LeStarch opened this issue Dec 11, 2024 · 0 comments · Fixed by #3071
Closed

Posix Implementation of Raw Time Missing Cast #3070

LeStarch opened this issue Dec 11, 2024 · 0 comments · Fixed by #3071
Labels

Comments

@LeStarch
Copy link
Collaborator

F´ Version
Affected Component

Problem Description

A description of the problem with sufficient detail to understand the issue.

Context / Environment

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

--INSERT HERE--

How to Reproduce

.../lib/fprime/Os/Posix/RawTime.cpp:70:39: error: non-constant-expression cannot be narrowed from type 'U32' (aka 'unsigned int') to 'long' in initializer list [-Wc++11-narrowing]
    this->m_handle.m_timespec = {sec, nsec};
                                      ^~~~
.../lib/fprime/Os/Posix/RawTime.cpp:70:39: note: insert an explicit cast to silence this issue
    this->m_handle.m_timespec = {sec, nsec};
                                      ^~~~
                                      static_cast<long>( )

We should cast to time_t and long respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant