[
https://issues.apache.org/jira/browse/THRIFT-2180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309417#comment-14309417
]
ASF GitHub Bot commented on THRIFT-2180:
----------------------------------------
GitHub user jeremy-w opened a pull request:
https://github.com/apache/thrift/pull/372
THRIFT-2180: Cocoa-Library: addresses integer type issues on 64-bit
platforms
No easy way to test, since there's no shared Xcode project to generate
warnings. For reference, I was building for iOS and for Mac with flags:
OTHER_CFLAGS = -Wall -Wextra -Weverything
-Wno-objc-missing-property-synthesis -Wno-unused-parameter -Wno-auto-import
-Wno-documentation-unknown-command -Wno-direct-ivar-access
-Wno-objc-interface-ivars
The remaining warnings should be addressed by issues THRIFT-2982 through
THRIFT-2987.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jeremy-w/thrift 64-bit-compat-THRIFT-2180
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/372.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #372
----
commit 95fd47cd7406e66450f11dcb39e1528b81a213a3
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T14:15:29Z
THRIFT-2180: changes TTransport methods to use size_t
size_t is conveniently unsigned and the maximum allowed width
on the target platform. This change makes it possible to
preserve this width across all implementors of the protocol.
commit 9b4a7d89359286a8cd30ca4fe166320dfa6dd5d3
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T14:20:04Z
THRIFT-2180: aligns TTransport readAll: argument names with write:
Previously, the two showed unnecessary variation such as using
len/length, off/offset. The unabbreviated forms were preferred
per Apple's Coding Guidelines for Cocoa.
commit ba2d8a66949f867f85c2e9484ce60df14d2f0cbe
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T14:23:34Z
THRIFT-2180: addresses signedness warning
Went with the somewhat head-scratching UInt32 rather than UInt16
in order to agree with the argument type passed to
CFStreamCreatePairWithSocketToHost().
commit ff9e0ea013f42bdeebb3f03e62896dd5c6490350
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T15:25:34Z
THRIFT-2180: addresses ignored semicolon warning
commit ca98fb53551a534def42a3631b3d36d4c8d6007e
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T15:34:10Z
THRIFT-2180: addresses change in required alignment warning
Casting a char* to a pointer to struct changes the required alignment.
It's almost certainly properly aligned, but by using memcpy instead
of assignment, the alignment of the host addresses in the buffer
ceases to matter.
commit eb0f385407938ed317a51633b4d0876cec75f0bb
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T16:15:00Z
THRIFT-2180: adds checked cast inline functions for TBinaryProtocol
commit 63f97138c95ae325b8dd4ecdb47e7dfc51377340
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T16:24:52Z
THRIFT-2180: avoids signedness issues by using union
commit 49301d04a41fd42bd2c261e651066a56e16f9134
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T16:27:58Z
THRIFT-2180: uses checked casts to safely handle integer signedness and
width changes
commit ad6821c67d533cdbe492522e7965d0e078462af9
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T16:30:27Z
THRIFT-2180: converts int to 64-bit-friendly size_t
commit e50fbcba50ac0b1fdc3e9ed55796f648c1c45d66
Author: Jeremy W. Sherman <[email protected]>
Date: 2015-02-06T16:31:10Z
THRIFT-2180: further size_t changes
Split this patch out from the rest for easier review,
because it also includes extracting an -ensureReadBufferHasLength: method.
----
> Integer types issues in Cocoa lib on ARM64
> ------------------------------------------
>
> Key: THRIFT-2180
> URL: https://issues.apache.org/jira/browse/THRIFT-2180
> Project: Thrift
> Issue Type: Bug
> Components: Cocoa - Library
> Affects Versions: 0.9.1
> Environment: ARM64, iOS, xcode5
> Reporter: Sébastien martini
>
> When compiling the Cocoa library (using the current master) for iOS on ARM64,
> xcode5 highlights several integer types warnings.
> Several of these instances are originated from the issue that the [NSData
> length] method returns an NSUInteger which is an unsigned long on ARM64 and
> is often assigned to an int (int32) in the Cocoa lib.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)