Skip to content

Conversation

@richrad
Copy link

@richrad richrad commented Nov 12, 2013

... 'NSUInteger' (aka 'unsigned long') to 'int'

…on: 'NSUInteger' (aka 'unsigned long') to 'int'
@jstart
Copy link

jstart commented Apr 7, 2014

👍

1 similar comment
@YSDC
Copy link

YSDC commented Nov 7, 2014

+1

@ewanmellor
Copy link
Contributor

+1, but this is also covered by PR #39.

@tblank555
Copy link

Simply silencing this one with a cast may not be the right call. - [NSData length] returns an NSUInteger, which is either an unsigned int (on 32 bit systems) or an unsigned long (on 64 bit systems). This value is being passed to a libxml function that is expecting an int, which I believe is always a 32 bit number.

So if it's a possibility that the length of the data exceeds 2^32-1, then there should be some code that checks that case. Is that a possibility? Seems like it'd be a pretty crazy edge case if it is...

After understanding that concern, I say we just cast it and get rid of this annoying warning :)

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants