Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve string type error in GTBlob.m #650

Merged
merged 2 commits into from
Apr 8, 2018
Merged

resolve string type error in GTBlob.m #650

merged 2 commits into from
Apr 8, 2018

Conversation

stepheneb
Copy link
Contributor

macosx: 10.13.4, XCode Version 9.3 (9E145)

reported this error compiling line 43 in GTBlob.m:

Format specifies type 'ssize_t' (aka 'long') but the argument has type 'git_off_t' (aka 'long long')

and suggested this fix:

Replace '%zi' with '%lli'

After applying the change xcode built objective-git successfully

macosx: 10.13.4, XCode Version 9.3 (9E145)

reported this error compiling line 43 in GTBlob.m:

Format specifies type 'ssize_t' (aka 'long') but the argument has type 'git_off_t' (aka 'long long')

and suggested this fix:

Replace '%zi' with '%lli'

After applying the change xcode built objective-git successfully
@@ -40,7 +40,7 @@
@implementation GTBlob

- (NSString *)description {
return [NSString stringWithFormat:@"<%@: %p> size: %zi, content: %@, data = %@", NSStringFromClass([self class]), self, [self size], [self content], [self data]];
return [NSString stringWithFormat:@"<%@: %p> size: %%lli, content: %@, data = %@", NSStringFromClass([self class]), self, [self size], [self content], [self data]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's an extraneous % in there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed
it was too late at night and I took a shortcut by making the change directly on github

pls squash with previous commit
@pietbrauer pietbrauer merged commit e22dfba into libgit2:master Apr 8, 2018
@pietbrauer
Copy link
Member

@tiennou Travis is still building on Xcode 8.3. Maybe worth an update too. 😀

@stepheneb stepheneb deleted the stepheneb-resolve-string-type-error branch April 8, 2018 14:06
apepper added a commit to apepper/gitx that referenced this pull request Apr 26, 2018
Contains bugfix libgit2/objective-git#650, which reported this error compiling line 43 in GTBlob.m:

Format specifies type 'ssize_t' (aka 'long') but the argument has type 'git_off_t' (aka 'long long')
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.

None yet

3 participants