[CONC-329] socket error paths never true on Power due to wrong type Created: 2018-05-09 Updated: 2018-08-08 Resolved: 2018-07-27 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 3.0.4 |
| Fix Version/s: | 3.0.6 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Daniel Black | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PPC64/ PPC64LE |
||
| Description |
|
The compile warning on Power and other architectures that defines char to be unsigned (which is allowed by C standard) causes there to be no error handling. In this case the SOCKET_ERROR (-1) is never true.
warnings (from ppc64 RHEL / gcc 4.8.5):
Fix: By being explicit about using signed char when negative values are used it creates a consistent API with x86_64 which is signed by default. PR also changes some times to void suspicious casting. |