Build failures with clang #7

Closed
opened 2 years ago by Ray-V · 3 comments
Ray-V commented 2 years ago
Collaborator

[1]

../../../../krusader/DiskUsage/radialMap/map.cpp:329:26: error: non-constant-expression cannot be narrowed from type 'uint' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
            int a[3] = { (*it)->start(), (*it)->length(), 0 };
                         ^~~~~~~~~~~~~~
../../../../krusader/DiskUsage/radialMap/map.cpp:329:26: note: insert an explicit cast to silence this issue
            int a[3] = { (*it)->start(), (*it)->length(), 0 };
                         ^~~~~~~~~~~~~~
                         static_cast<int>( )
../../../../krusader/DiskUsage/radialMap/map.cpp:329:42: error: non-constant-expression cannot be narrowed from type 'uint' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
            int a[3] = { (*it)->start(), (*it)->length(), 0 };
                                         ^~~~~~~~~~~~~~~
../../../../krusader/DiskUsage/radialMap/map.cpp:329:42: note: insert an explicit cast to silence this issue
            int a[3] = { (*it)->start(), (*it)->length(), 0 };
                                         ^~~~~~~~~~~~~~~
                                         static_cast<int>( )

[2]

../../../krusader/UserAction/useraction.cpp:113:61: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
                i18n( "The actionfile's root-element isn't called "ACTION_ROOT", using %1").arg( filename ),
                                                                   ^
[1] ``` ../../../../krusader/DiskUsage/radialMap/map.cpp:329:26: error: non-constant-expression cannot be narrowed from type 'uint' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] int a[3] = { (*it)->start(), (*it)->length(), 0 }; ^~~~~~~~~~~~~~ ../../../../krusader/DiskUsage/radialMap/map.cpp:329:26: note: insert an explicit cast to silence this issue int a[3] = { (*it)->start(), (*it)->length(), 0 }; ^~~~~~~~~~~~~~ static_cast<int>( ) ../../../../krusader/DiskUsage/radialMap/map.cpp:329:42: error: non-constant-expression cannot be narrowed from type 'uint' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] int a[3] = { (*it)->start(), (*it)->length(), 0 }; ^~~~~~~~~~~~~~~ ../../../../krusader/DiskUsage/radialMap/map.cpp:329:42: note: insert an explicit cast to silence this issue int a[3] = { (*it)->start(), (*it)->length(), 0 }; ^~~~~~~~~~~~~~~ static_cast<int>( ) ``` [2] ``` ../../../krusader/UserAction/useraction.cpp:113:61: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] i18n( "The actionfile's root-element isn't called "ACTION_ROOT", using %1").arg( filename ), ^ ```
Owner

@Ray-V
I could reproduce the problem and made a fix for it. Unfortunately I don't have a fully clang-based TDE system now and so at some point linking failed and the build did not complete successfully with clang.
Could you verify that PR #8 does fix the build on your side?

@Ray-V I could reproduce the problem and made a fix for it. Unfortunately I don't have a fully clang-based TDE system now and so at some point linking failed and the build did not complete successfully with clang. Could you verify that PR #8 does fix the build on your side?
MicheleC added this to the R14.0.13 release milestone 2 years ago
Ray-V commented 2 years ago
Poster
Collaborator

Yes - links and runs - all ok.

Yes - links and runs - all ok.
MicheleC closed this issue 2 years ago
Owner

Thanks

Thanks
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/krusader#7
Loading…
There is no content yet.