Bug 1423200
| Summary: | 0ad: FTBFS in rawhide | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Fedora Release Engineering <releng> | ||||||||
| Component: | 0ad | Assignee: | Paulo Andrade <paulo.cesar.pereira.de.andrade> | ||||||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
| Severity: | unspecified | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 26 | CC: | bioinfornatics, cheese, ignatenko, jwakely, paulo.cesar.pereira.de.andrade, walter.pete, zbyszek | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2017-07-20 21:41:57 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 1423041 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Fedora Release Engineering
2017-02-17 03:08:42 UTC
Created attachment 1251366 [details]
build.log
Created attachment 1251367 [details]
root.log
Created attachment 1251368 [details]
state.log
../../../source/gui/CDropDown.cpp: In member function 'virtual InReaction CDropDown::ManuallyHandleEvent(const SDL_Event_*)':
../../../source/gui/CDropDown.cpp:348:94: error: call of overloaded 'abs(unsigned int)' is ambiguous
diff = abs(pList->m_Items[i].GetOriginalString().LowerCase()[j] - (int)m_InputBuffer[j]);
^
This is documented at https://gcc.gnu.org/gcc-7/porting_to.html#cmath
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'. A right, this only happens on arm, where 'char' is 'unsigned char', while most other architectures have 'char' which is 'signed char'. The code is subtracting (unsigned char) - (int), which is promoted to unsigned int, and abs((unsigned int)) is undefined. So the fix would be: - diff = abs(pList->m_Items[i].GetOriginalString().LowerCase()[j] - (int)m_InputBuffer[j]); + diff = abs((int) pList->m_Items[i].GetOriginalString().LowerCase()[j] - (int)m_InputBuffer[j]); Should be easy enough. (In reply to Zbigniew Jędrzejewski-Szmek from comment #6) > A right, this only happens on arm, where 'char' is 'unsigned char', while > most other architectures have 'char' which is 'signed char'. The code is Strictly speaking char is signed or unsigned, but is not signed char or unsigned char. It's always a distinct type. > subtracting (unsigned char) - (int), which is promoted to unsigned int, and > abs((unsigned int)) is undefined. > > So the fix would be: > > - diff = abs(pList->m_Items[i].GetOriginalString().LowerCase()[j] - > (int)m_InputBuffer[j]); > + diff = abs((int) > pList->m_Items[i].GetOriginalString().LowerCase()[j] - > (int)m_InputBuffer[j]); > > Should be easy enough. Looks good to me. I need to rebuild this for Boost 1.64 anyway, so I'll make that change. |