mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:42:52 +08:00
CB-6212 iOS: fix warnings compiled under arm64 64-bit
This commit is contained in:
parent
5393a28191
commit
c9bab1f94c
@ -84,7 +84,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
|||||||
|
|
||||||
bool hasCamera = [UIImagePickerController isSourceTypeAvailable:sourceType];
|
bool hasCamera = [UIImagePickerController isSourceTypeAvailable:sourceType];
|
||||||
if (!hasCamera) {
|
if (!hasCamera) {
|
||||||
NSLog(@"Camera.getPicture: source type %d not available.", sourceType);
|
NSLog(@"Camera.getPicture: source type %ld not available.", sourceType);
|
||||||
CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"no camera available"];
|
CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"no camera available"];
|
||||||
[self.commandDelegate sendPluginResult:result callbackId:callbackId];
|
[self.commandDelegate sendPluginResult:result callbackId:callbackId];
|
||||||
return;
|
return;
|
||||||
@ -170,10 +170,10 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
|||||||
|
|
||||||
- (void)displayPopover:(NSDictionary*)options
|
- (void)displayPopover:(NSDictionary*)options
|
||||||
{
|
{
|
||||||
int x = 0;
|
NSInteger x = 0;
|
||||||
int y = 32;
|
NSInteger y = 32;
|
||||||
int width = 320;
|
NSInteger width = 320;
|
||||||
int height = 480;
|
NSInteger height = 480;
|
||||||
UIPopoverArrowDirection arrowDirection = UIPopoverArrowDirectionAny;
|
UIPopoverArrowDirection arrowDirection = UIPopoverArrowDirectionAny;
|
||||||
|
|
||||||
if (options) {
|
if (options) {
|
||||||
@ -182,7 +182,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
|||||||
width = [options integerValueForKey:@"width" defaultValue:320];
|
width = [options integerValueForKey:@"width" defaultValue:320];
|
||||||
height = [options integerValueForKey:@"height" defaultValue:480];
|
height = [options integerValueForKey:@"height" defaultValue:480];
|
||||||
arrowDirection = [options integerValueForKey:@"arrowDir" defaultValue:UIPopoverArrowDirectionAny];
|
arrowDirection = [options integerValueForKey:@"arrowDir" defaultValue:UIPopoverArrowDirectionAny];
|
||||||
if (![org_apache_cordova_validArrowDirections containsObject:[NSNumber numberWithInt:arrowDirection]]) {
|
if (![org_apache_cordova_validArrowDirections containsObject:[NSNumber numberWithUnsignedInteger:arrowDirection]]) {
|
||||||
arrowDirection = UIPopoverArrowDirectionAny;
|
arrowDirection = UIPopoverArrowDirectionAny;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ const uint mTiffLength = 0x2a; // after byte align bits, next to bits are 0x002a
|
|||||||
// construct the complete app1 data block
|
// construct the complete app1 data block
|
||||||
app1 = [[NSMutableString alloc] initWithFormat: @"%@%04x%@%@%@%@%@",
|
app1 = [[NSMutableString alloc] initWithFormat: @"%@%04x%@%@%@%@%@",
|
||||||
app1marker,
|
app1marker,
|
||||||
16 + ([exifIFD length]/2) + ([subExifIFD length]/2) /*16+[exifIFD length]/2*/,
|
(unsigned int)(16 + ([exifIFD length]/2) + ([subExifIFD length]/2)) /*16+[exifIFD length]/2*/,
|
||||||
exifmarker,
|
exifmarker,
|
||||||
tiffheader,
|
tiffheader,
|
||||||
ifd0offset,
|
ifd0offset,
|
||||||
@ -268,10 +268,10 @@ const uint mTiffLength = 0x2a; // after byte align bits, next to bits are 0x002a
|
|||||||
}
|
}
|
||||||
|
|
||||||
// calculate IFD0 terminal offset tags, currently ExifSubIFD
|
// calculate IFD0 terminal offset tags, currently ExifSubIFD
|
||||||
int entrycount = [ifdblock count];
|
unsigned int entrycount = (unsigned int)[ifdblock count];
|
||||||
if (ifd0flag) {
|
if (ifd0flag) {
|
||||||
// 18 accounts for 8769's width + offset to next ifd, 8 accounts for start of header
|
// 18 accounts for 8769's width + offset to next ifd, 8 accounts for start of header
|
||||||
NSNumber * offset = [NSNumber numberWithInt:[exifstr length] / 2 + [dbstr length] / 2 + 18+8];
|
NSNumber * offset = [NSNumber numberWithUnsignedInteger:[exifstr length] / 2 + [dbstr length] / 2 + 18+8];
|
||||||
|
|
||||||
[self appendExifOffsetTagTo: exifstr
|
[self appendExifOffsetTagTo: exifstr
|
||||||
withOffset : offset];
|
withOffset : offset];
|
||||||
@ -293,7 +293,7 @@ const uint mTiffLength = 0x2a; // after byte align bits, next to bits are 0x002a
|
|||||||
NSNumber * dataformat = [formtemplate objectAtIndex:1];
|
NSNumber * dataformat = [formtemplate objectAtIndex:1];
|
||||||
NSNumber * components = [formtemplate objectAtIndex:2];
|
NSNumber * components = [formtemplate objectAtIndex:2];
|
||||||
if([components intValue] == 0) {
|
if([components intValue] == 0) {
|
||||||
components = [NSNumber numberWithInt: [data length] * DataTypeToWidth[[dataformat intValue]-1]];
|
components = [NSNumber numberWithUnsignedInteger:[data length] * DataTypeToWidth[[dataformat intValue]-1]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [[NSString alloc] initWithFormat: @"%@%@%08x",
|
return [[NSString alloc] initWithFormat: @"%@%@%08x",
|
||||||
@ -344,7 +344,7 @@ const uint mTiffLength = 0x2a; // after byte align bits, next to bits are 0x002a
|
|||||||
[datastr appendString:[dataformat objectAtIndex:3]];
|
[datastr appendString:[dataformat objectAtIndex:3]];
|
||||||
}
|
}
|
||||||
if ([datastr length] < 8) {
|
if ([datastr length] < 8) {
|
||||||
NSString * format = [NSString stringWithFormat:@"%%0%dd", 8 - [datastr length]];
|
NSString * format = [NSString stringWithFormat:@"%%0%dd", (int)(8 - [datastr length])];
|
||||||
[datastr appendFormat:format,0];
|
[datastr appendFormat:format,0];
|
||||||
}
|
}
|
||||||
return datastr;
|
return datastr;
|
||||||
@ -464,7 +464,7 @@ const uint mTiffLength = 0x2a; // after byte align bits, next to bits are 0x002a
|
|||||||
-(void) expandContinuedFraction: (NSArray*) fractionlist
|
-(void) expandContinuedFraction: (NSArray*) fractionlist
|
||||||
withResultNumerator: (NSNumber**) numerator
|
withResultNumerator: (NSNumber**) numerator
|
||||||
withResultDenominator: (NSNumber**) denominator {
|
withResultDenominator: (NSNumber**) denominator {
|
||||||
int i = 0;
|
NSUInteger i = 0;
|
||||||
int den = 0;
|
int den = 0;
|
||||||
int num = 0;
|
int num = 0;
|
||||||
if ([fractionlist count] == 1) {
|
if ([fractionlist count] == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user