summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxant <xant@xant.net>2013-07-11 17:12:52 (GMT)
committer xant <xant@xant.net>2013-07-11 17:12:52 (GMT)
commitf2208cdef50debe289236312d78422b184acd760 (patch)
treeb9ca015ca481417ff0a8362e4b41c5be57eec5cf
parent95d0934bcfa39140dc883e72f7945be45a9c12c9 (diff)
suppressed some warnings by doing explicit casts
I prefer to have warnings enabled than suppressing them via the compiler flag
-rwxr-xr-xHID Utilities/HID_Config_Utilities.c22
-rwxr-xr-xHID Utilities/IOHIDManager/IOHIDDevice_.c4
-rw-r--r--JMX.xcodeproj/project.pbxproj16
-rw-r--r--core/JMXAudioBuffer.m2
-rw-r--r--core/JMXAudioDevice.m6
-rw-r--r--core/JMXAudioFile.m4
-rw-r--r--core/JMXByteArray.h4
-rw-r--r--core/JMXDrawPath.mm4
-rw-r--r--core/JMXHIDDevice.m4
-rw-r--r--core/JMXPin.mm6
-rw-r--r--core/JMXScript.mm14
-rw-r--r--core/JMXSpectrumAnalyzer.m4
-rw-r--r--core/JMXTextRenderer.m4
-rw-r--r--entities/JMXAudioCapture.mm2
-rw-r--r--entities/JMXAudioOutput.mm2
-rw-r--r--entities/JMXAudioSpectrumAnalyzer.mm8
-rw-r--r--entities/JMXScriptEntity.mm2
-rw-r--r--entities/JMXVideoCapture.mm2
-rw-r--r--entities/JMXVideoFilter.mm2
-rw-r--r--entities/audio/JMXAudioFileEntity.mm2
-rw-r--r--entities/audio_outputs/JMXCoreAudioOutput.mm2
-rw-r--r--entities/video/JMXImageEntity.mm2
-rw-r--r--entities/video/JMXQtMovieEntity.mm4
23 files changed, 69 insertions, 53 deletions
diff --git a/HID Utilities/HID_Config_Utilities.c b/HID Utilities/HID_Config_Utilities.c
index ec84314..19c0f7e 100755
--- a/HID Utilities/HID_Config_Utilities.c
+++ b/HID Utilities/HID_Config_Utilities.c
@@ -373,13 +373,13 @@ Boolean HIDSaveElementPref( const CFStringRef inKeyCFStringRef,
if ( inKeyCFStringRef && inAppCFStringRef && inIOHIDDeviceRef && inIOHIDElementRef ) {
long vendorID = IOHIDDevice_GetVendorID( inIOHIDDeviceRef );
- require( vendorID, Oops );
+ //require( vendorID, Oops );
long productID = IOHIDDevice_GetProductID( inIOHIDDeviceRef );
- require( productID, Oops );
+ //require( productID, Oops );
long locID = IOHIDDevice_GetLocationID( inIOHIDDeviceRef );
- require( locID, Oops );
+ //require( locID, Oops );
uint32_t usagePage = IOHIDDevice_GetUsagePage( inIOHIDDeviceRef );
uint32_t usage = IOHIDDevice_GetUsage( inIOHIDDeviceRef );
@@ -388,7 +388,7 @@ Boolean HIDSaveElementPref( const CFStringRef inKeyCFStringRef,
usagePage = IOHIDDevice_GetPrimaryUsagePage( inIOHIDDeviceRef );
usage = IOHIDDevice_GetPrimaryUsage( inIOHIDDeviceRef );
}
- require( usagePage && usage, Oops );
+ //require( usagePage && usage, Oops );
uint32_t usagePageE = IOHIDElementGetUsagePage( inIOHIDElementRef );
uint32_t usageE = IOHIDElementGetUsage( inIOHIDElementRef );
@@ -698,16 +698,16 @@ void HIDSetElementConfig (pRecSaveHID pConfigRec, IOHIDDeviceRef inIOHIDDeviceRe
// device
// need to add serial number when I have a test case
if (inIOHIDDeviceRef && inIOHIDElementRef) {
- pConfigRec->device.vendorID = IOHIDDevice_GetVendorID( inIOHIDDeviceRef );
- pConfigRec->device.productID = IOHIDDevice_GetProductID( inIOHIDDeviceRef );
- pConfigRec->device.locID = IOHIDDevice_GetLocationID( inIOHIDDeviceRef );
- pConfigRec->device.usage = IOHIDDevice_GetUsage( inIOHIDDeviceRef );
- pConfigRec->device.usagePage = IOHIDDevice_GetUsagePage( inIOHIDDeviceRef );
+ pConfigRec->device.vendorID = (int)IOHIDDevice_GetVendorID( inIOHIDDeviceRef );
+ pConfigRec->device.productID = (int)IOHIDDevice_GetProductID( inIOHIDDeviceRef );
+ pConfigRec->device.locID = (int)IOHIDDevice_GetLocationID( inIOHIDDeviceRef );
+ pConfigRec->device.usage = (int)IOHIDDevice_GetUsage( inIOHIDDeviceRef );
+ pConfigRec->device.usagePage = (int)IOHIDDevice_GetUsagePage( inIOHIDDeviceRef );
pConfigRec->element.usagePage = IOHIDElementGetUsagePage( inIOHIDElementRef );
pConfigRec->element.usage = IOHIDElementGetUsage( inIOHIDElementRef );
- pConfigRec->element.minReport = IOHIDElement_GetCalibrationSaturationMin( inIOHIDElementRef );
- pConfigRec->element.maxReport = IOHIDElement_GetCalibrationSaturationMax( inIOHIDElementRef );
+ pConfigRec->element.minReport = (int)IOHIDElement_GetCalibrationSaturationMin( inIOHIDElementRef );
+ pConfigRec->element.maxReport = (int)IOHIDElement_GetCalibrationSaturationMax( inIOHIDElementRef );
pConfigRec->element.cookie = IOHIDElementGetCookie( inIOHIDElementRef );
} else {
pConfigRec->device.vendorID = 0;
diff --git a/HID Utilities/IOHIDManager/IOHIDDevice_.c b/HID Utilities/IOHIDManager/IOHIDDevice_.c
index d6a36a0..0737a54 100755
--- a/HID Utilities/IOHIDManager/IOHIDDevice_.c
+++ b/HID Utilities/IOHIDManager/IOHIDDevice_.c
@@ -343,7 +343,7 @@ CFArrayRef IOHIDDevice_GetUsagePairs( IOHIDDeviceRef inIOHIDDeviceRef )
uint32_t IOHIDDevice_GetPrimaryUsage( IOHIDDeviceRef inIOHIDDeviceRef )
{
- long result = 0;
+ uint32_t result = 0;
( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDPrimaryUsageKey ), (long *)&result );
return result;
}
@@ -361,7 +361,7 @@ uint32_t IOHIDDevice_GetPrimaryUsage( IOHIDDeviceRef inIOHIDDeviceRef )
uint32_t IOHIDDevice_GetPrimaryUsagePage( IOHIDDeviceRef inIOHIDDeviceRef )
{
- long result = 0;
+ uint32_t result = 0;
( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDPrimaryUsagePageKey ), (long *)&result );
return result;
}
diff --git a/JMX.xcodeproj/project.pbxproj b/JMX.xcodeproj/project.pbxproj
index 100424b..7500cc7 100644
--- a/JMX.xcodeproj/project.pbxproj
+++ b/JMX.xcodeproj/project.pbxproj
@@ -258,6 +258,8 @@
AA9BFB50178F1894003673D9 /* CIAdditiveBlur.cikernel in Resources */ = {isa = PBXBuildFile; fileRef = AAEBBA1214FD65CE000DA6F9 /* CIAdditiveBlur.cikernel */; };
AA9BFB51178F1899003673D9 /* CIAlphaBlend.cikernel in Resources */ = {isa = PBXBuildFile; fileRef = AAEBB8AC14FC1839000DA6F9 /* CIAlphaBlend.cikernel */; };
AA9BFB52178F189D003673D9 /* CIAlphaFade.cikernel in Resources */ = {isa = PBXBuildFile; fileRef = AA555FC912AEF39600C882FF /* CIAlphaFade.cikernel */; };
+ AA9BFB56178F19DE003673D9 /* v8.h in Headers */ = {isa = PBXBuildFile; fileRef = AA9BFB54178F19DE003673D9 /* v8.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ AA9BFB57178F19DE003673D9 /* v8stdint.h in Headers */ = {isa = PBXBuildFile; fileRef = AA9BFB55178F19DE003673D9 /* v8stdint.h */; settings = {ATTRIBUTES = (Public, ); }; };
AAB50B5F14DD4956002F385C /* processing_sample1.js in Deploy JS examples */ = {isa = PBXBuildFile; fileRef = AAB50B5914DD493E002F385C /* processing_sample1.js */; };
AAB50B6014DD4956002F385C /* processing_sample2.js in Deploy JS examples */ = {isa = PBXBuildFile; fileRef = AAB50B5A14DD493E002F385C /* processing_sample2.js */; };
AAB50B6114DD4956002F385C /* processing_sample3.js in Deploy JS examples */ = {isa = PBXBuildFile; fileRef = AAB50B5B14DD493E002F385C /* processing_sample3.js */; };
@@ -561,6 +563,8 @@
AA9BFA67178F0FB2003673D9 /* JMXCore-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "JMXCore-Info.plist"; sourceTree = "<group>"; };
AA9BFA69178F0FB2003673D9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
AA9BFA6B178F0FB2003673D9 /* JMXCore-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JMXCore-Prefix.pch"; sourceTree = "<group>"; };
+ AA9BFB54178F19DE003673D9 /* v8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = v8.h; path = node.js/deps/v8/include/v8.h; sourceTree = SOURCE_ROOT; };
+ AA9BFB55178F19DE003673D9 /* v8stdint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = v8stdint.h; path = node.js/deps/v8/include/v8stdint.h; sourceTree = SOURCE_ROOT; };
AA9C17FA12E200C400329158 /* JMXCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMXCanvasElement.h; sourceTree = "<group>"; };
AA9C17FB12E200C400329158 /* JMXCanvasElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JMXCanvasElement.mm; sourceTree = "<group>"; };
AA9C18D812E2FC1000329158 /* JMXCanvasGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMXCanvasGradient.h; sourceTree = "<group>"; };
@@ -1001,6 +1005,7 @@
AA830A2614AB4CD900E7F544 /* V8+DOM */ = {
isa = PBXGroup;
children = (
+ AA9BFB53178F19C1003673D9 /* externals */,
AA9B58D514FE1E4F00F63C33 /* NSNumber+V8.h */,
AA9B58D614FE1E4F00F63C33 /* NSNumber+V8.mm */,
AA9B58D714FE1E4F00F63C33 /* NSString+V8.h */,
@@ -1251,6 +1256,15 @@
name = "Supporting Files";
sourceTree = "<group>";
};
+ AA9BFB53178F19C1003673D9 /* externals */ = {
+ isa = PBXGroup;
+ children = (
+ AA9BFB54178F19DE003673D9 /* v8.h */,
+ AA9BFB55178F19DE003673D9 /* v8stdint.h */,
+ );
+ name = externals;
+ sourceTree = "<group>";
+ };
AAEF97F514FA5BD8006B9F8B /* HID Utilities */ = {
isa = PBXGroup;
children = (
@@ -1398,6 +1412,8 @@
AA9BFB4D178F1808003673D9 /* JMXSoftScreen.h in Headers */,
AA9BFB4E178F1808003673D9 /* JMXScriptFile.h in Headers */,
AA9BFB4F178F1808003673D9 /* JMXScriptLive.h in Headers */,
+ AA9BFB56178F19DE003673D9 /* v8.h in Headers */,
+ AA9BFB57178F19DE003673D9 /* v8stdint.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/core/JMXAudioBuffer.m b/core/JMXAudioBuffer.m
index b6b04c3..e06b97b 100644
--- a/core/JMXAudioBuffer.m
+++ b/core/JMXAudioBuffer.m
@@ -162,7 +162,7 @@
- (OSStatus)fillComplexBuffer:(AudioBufferList *)ioData countPointer:(UInt32 *)ioNumberFrames offset:(UInt32)offset
{
unsigned i;
- unsigned framesInBuffer = [self numFrames];
+ unsigned framesInBuffer = (unsigned)[self numFrames];
*ioNumberFrames = MIN ( *ioNumberFrames, framesInBuffer );
diff --git a/core/JMXAudioDevice.m b/core/JMXAudioDevice.m
index d4d0166..1f9831e 100644
--- a/core/JMXAudioDevice.m
+++ b/core/JMXAudioDevice.m
@@ -1148,14 +1148,14 @@ finish:
AudioDevicePropertyID thePropertyID;
BOOL hasVolumeInfoDidChangeMethod = false;
- theDeviceID = [[theUserInfo objectForKey:kJMXAudioDeviceIDKey] unsignedLongValue];
+ theDeviceID = [[theUserInfo objectForKey:kJMXAudioDeviceIDKey] unsignedIntValue];
// if (delegate && (theDeviceID == deviceID))
if (theDeviceID == deviceID)
{
theDirection = ( [[theUserInfo objectForKey:kJMXAudioDirectionKey] boolValue] ) ? kJMXAudioInput : kJMXAudioOutput ;
- theChannel = [[theUserInfo objectForKey:kJMXAudioChannelKey] unsignedLongValue];
- thePropertyID = [[theUserInfo objectForKey:kJMXAudioPropertyIDKey] unsignedLongValue];
+ theChannel = [[theUserInfo objectForKey:kJMXAudioChannelKey] unsignedIntValue];
+ thePropertyID = [[theUserInfo objectForKey:kJMXAudioPropertyIDKey] unsignedIntValue];
switch (thePropertyID)
{
diff --git a/core/JMXAudioFile.m b/core/JMXAudioFile.m
index 8096cda..0444b99 100644
--- a/core/JMXAudioFile.m
+++ b/core/JMXAudioFile.m
@@ -165,11 +165,11 @@
// Read all the data into memory
//UInt32 theFramesToRead = (UInt32)theFileLengthInFrames;
- UInt32 dataSize = numFrames * theOutputFormat.mBytesPerFrame;
+ UInt32 dataSize = (UInt32)numFrames * theOutputFormat.mBytesPerFrame;
data = malloc(dataSize);
if (data)
{
- UInt32 nFrames = numFrames;
+ UInt32 nFrames = (UInt32)numFrames;
AudioBufferList *theDataBuffer = calloc(1, sizeof(AudioBufferList));
theDataBuffer->mNumberBuffers = 1;
theDataBuffer->mBuffers[0].mDataByteSize = dataSize;
diff --git a/core/JMXByteArray.h b/core/JMXByteArray.h
index ac532d6..ad99e2e 100644
--- a/core/JMXByteArray.h
+++ b/core/JMXByteArray.h
@@ -12,13 +12,13 @@
@interface JMXByteArray : NSObject <JMXV8>
{
uint8_t *buffer;
- int size;
+ size_t size;
BOOL copy;
BOOL mustFreeOnRelease;
}
@property (readonly) uint8_t *buffer;
-@property (readonly) int size;
+@property (readonly) size_t size;
+ (id)byteArrayWithBytes:(uint8_t *)bytes length:(size_t)length;
diff --git a/core/JMXDrawPath.mm b/core/JMXDrawPath.mm
index 7e201c7..6907477 100644
--- a/core/JMXDrawPath.mm
+++ b/core/JMXDrawPath.mm
@@ -1381,7 +1381,7 @@ static v8::Handle<Value> StrokeText(const Arguments& args)
if (args.Length() >= 3) {
int maxWidth = 0;
if (args.Length() > 3) { // maxWidth has been provided
- maxWidth = args[2]->IntegerValue();
+ maxWidth = (int)args[2]->IntegerValue();
if (maxWidth == 0) // The spec says to stop doing anything if 0 has been passed as maxWidth
return handleScope.Close(v8::Undefined());
}
@@ -1404,7 +1404,7 @@ static v8::Handle<Value> FillText(const Arguments& args)
if (args.Length() >= 3) {
int maxWidth = 0;
if (args.Length() > 3) { // maxWidth has been provided
- maxWidth = args[2]->IntegerValue();
+ maxWidth = (int)args[2]->IntegerValue();
if (maxWidth == 0) // The spec says to stop doing anything if 0 has been passed as maxWidth
return handleScope.Close(v8::Undefined());
}
diff --git a/core/JMXHIDDevice.m b/core/JMXHIDDevice.m
index 1ec7796..758971e 100644
--- a/core/JMXHIDDevice.m
+++ b/core/JMXHIDDevice.m
@@ -121,7 +121,7 @@ static void JMXIOHIDReportCallback(
}
JMXHIDDeviceReport *reportBuffer = [[[JMXHIDDeviceReport alloc]
initWithReport:report
- length:reportLength
+ length:(uint32_t)reportLength
type:reportType] autorelease];
if (device.delegate)
@@ -186,7 +186,7 @@ static void JMXIOHIDRemoveCallback(void *context, IOReturn result, void *sender)
if (self) {
deviceRef = aDeviceRef;
IOReturn tIOReturn = IOHIDDeviceOpen(deviceRef, kIOHIDOptionsTypeNone);
- require_noerr(tIOReturn, Oops);
+ //require_noerr(tIOReturn, Oops);
IOHIDDeviceRegisterInputValueCallback(deviceRef, JMXIOHIDValueCallback, self);
uint8_t *buffer = malloc(255);
IOHIDDeviceRegisterInputReportCallback(deviceRef, buffer, 255, JMXIOHIDReportCallback, self);
diff --git a/core/JMXPin.mm b/core/JMXPin.mm
index 97ac072..14c9bec 100644
--- a/core/JMXPin.mm
+++ b/core/JMXPin.mm
@@ -702,7 +702,7 @@ static v8::Handle<Value>type(Local<String> name, const AccessorInfo& info)
JMXPin *pin = (JMXPin *)info.Holder()->GetPointerFromInternalField(0);
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *typeName = [pin typeName];
- v8::Handle<String> ret = String::New([typeName UTF8String], [typeName length]);
+ v8::Handle<String> ret = String::New([typeName UTF8String], (int)[typeName length]);
[pool drain];
return handle_scope.Close(ret);
}
@@ -714,7 +714,7 @@ static v8::Handle<Value>mode(Local<String> name, const AccessorInfo& info)
JMXPin *pin = (JMXPin *)info.Holder()->GetPointerFromInternalField(0);
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *modeName = [pin modeName];
- v8::Handle<String> ret = String::New([modeName UTF8String], [modeName length]);
+ v8::Handle<String> ret = String::New([modeName UTF8String], (int)[modeName length]);
[pool drain];
return handle_scope.Close(ret);
}
@@ -732,7 +732,7 @@ static v8::Handle<Value>connect(const Arguments& args)
{
v8::Unlocker unlocker;
wrapper = [ctx.scriptEntity wrapPin:pin
- withFunction:Persistent<Function>::New(Handle<Function>::Cast(args[0]))];
+ withFunction:Persistent<Function>::New(Handle<Function>::Cast(args[0]))];
[pool release];
}
if (wrapper)
diff --git a/core/JMXScript.mm b/core/JMXScript.mm
index 71cd34b..7c52a37 100644
--- a/core/JMXScript.mm
+++ b/core/JMXScript.mm
@@ -57,7 +57,7 @@
#import "NSObject+V8.h"
#include "node_natives_jmx.h"
-#include "node_String.h"
+#include "node_string.h"
using namespace v8;
using namespace std;
@@ -331,7 +331,7 @@ static v8::Handle<Value> Include(const Arguments& args) {
BOOL ret = NO;
if (fh) {
NSData *data = [fh readDataToEndOfFile];
- ret = ExecJSCode((const char *)[data bytes], [data length], [path UTF8String]);
+ ret = ExecJSCode((const char *)[data bytes], (uint32_t)[data length], [path UTF8String]);
}
[pool release];
return scope.Close(v8::Boolean::New(ret ? 1 : 0));
@@ -681,7 +681,7 @@ static char *argv[2] = { (char *)"JMX", NULL };
v8::Context::Scope context_scope(ctx);
JMXScriptTimer *foo = timer.userInfo;
if (foo.statements && [foo.statements length]) {
- ExecJSCode([foo.statements UTF8String], [foo.statements length], "JMXScriptTimeout");
+ ExecJSCode([foo.statements UTF8String], (uint32_t)[foo.statements length], "JMXScriptTimeout");
if (!foo.repeats) {
[foo.timer invalidate];
[runloopTimers removeObject:foo];
@@ -714,7 +714,7 @@ static char *argv[2] = { (char *)"JMX", NULL };
v8::Locker locker;
HandleScope handleScope;
v8::TryCatch try_catch;
- v8::Handle<Value> ret = function->Call(function, count, argv);
+ v8::Handle<Value> ret = function->Call(function, (int)count, argv);
if (ret.IsEmpty()) {
ReportException(&try_catch);
return Undefined();
@@ -877,7 +877,7 @@ static char *argv[2] = { (char *)"JMX", NULL };
- (BOOL)execCode:(NSString *)code
{
- return ExecJSCode((const char *)[code UTF8String], [code length], "code");
+ return ExecJSCode((const char *)[code UTF8String], (uint32_t)[code length], "code");
}
- (BOOL)runScript:(NSString *)script withArgs:(NSArray *)args
@@ -890,7 +890,7 @@ static char *argv[2] = { (char *)"JMX", NULL };
if (args && args.count) {
- v8::Handle<Array> argv = Array::New([args count]);
+ v8::Handle<Array> argv = Array::New((int)[args count]);
int cnt = 0;
for (id arg in args) {
if ([arg respondsToSelector:@selector(jsoObj)])
@@ -907,7 +907,7 @@ static char *argv[2] = { (char *)"JMX", NULL };
BOOL ret = NO;
{
v8::Unlocker unlocker;
- ret = ExecJSCode([script UTF8String], [script length],
+ ret = ExecJSCode([script UTF8String], (uint32_t)[script length],
scriptEntity
? [scriptEntity.label UTF8String]
: [[NSString stringWithFormat:@"%@", self] UTF8String]);
diff --git a/core/JMXSpectrumAnalyzer.m b/core/JMXSpectrumAnalyzer.m
index ba0f363..dd75e68 100644
--- a/core/JMXSpectrumAnalyzer.m
+++ b/core/JMXSpectrumAnalyzer.m
@@ -79,7 +79,7 @@ static inline UInt32 Log2Ceil(UInt32 x)
// next power of two greater or equal to x
static inline UInt32 NextPowerOfTwo(UInt32 x)
{
- return 1L << Log2Ceil(x);
+ return (UInt32)(1L << Log2Ceil(x));
}
@@ -366,7 +366,7 @@ const double two_pi = 2. * M_PI;
- (void)copyInput:(AudioBufferList *)input frames:(UInt32)numFrames
{
int i;
- int channelsNum = MIN([channels count], input->mNumberBuffers);
+ int channelsNum = (int)MIN([channels count], input->mNumberBuffers);
// TODO - deinterleave
for (i = 0; i < channelsNum; i++) {
JMXSpectralChannel *channel = [channels objectAtIndex:i];
diff --git a/core/JMXTextRenderer.m b/core/JMXTextRenderer.m
index 161d5d5..0f82d07 100644
--- a/core/JMXTextRenderer.m
+++ b/core/JMXTextRenderer.m
@@ -295,8 +295,8 @@
[self genImage];
- int pxWidth = CVPixelBufferGetWidth(pixelBuffer);
- int pxHeight = CVPixelBufferGetHeight(pixelBuffer);
+ size_t pxWidth = CVPixelBufferGetWidth(pixelBuffer);
+ size_t pxHeight = CVPixelBufferGetHeight(pixelBuffer);
CVPixelBufferLockBaseAddress(pixelBuffer, 0);
void *rasterData = CVPixelBufferGetBaseAddress(pixelBuffer);
size_t bytesPerRow = CVPixelBufferGetBytesPerRow(pixelBuffer);
diff --git a/entities/JMXAudioCapture.mm b/entities/JMXAudioCapture.mm
index ef9662c..5a07c31 100644
--- a/entities/JMXAudioCapture.mm
+++ b/entities/JMXAudioCapture.mm
@@ -154,7 +154,7 @@ static v8::Handle<Value> AvailableDevices(const Arguments& args)
Class objcClass = (Class)External::Cast(*(args.Holder()->Get(String::NewSymbol("_objcClass"))))->Value();
availableDevices = [objcClass availableDevices];
}
- v8::Handle<Array> list = v8::Array::New([availableDevices count]);
+ v8::Handle<Array> list = v8::Array::New((int)[availableDevices count]);
for (int i = 0; i < [availableDevices count]; i++) {
list->Set(Number::New(i), String::New([[availableDevices objectAtIndex:i] UTF8String]));
}
diff --git a/entities/JMXAudioOutput.mm b/entities/JMXAudioOutput.mm
index f66b5fe..b545fa5 100644
--- a/entities/JMXAudioOutput.mm
+++ b/entities/JMXAudioOutput.mm
@@ -192,7 +192,7 @@ static OSStatus _FillComplexBufferProc (
}
OSStatus err = noErr;
CallbackContext callbackContext;
- UInt32 framesRead = [buffer numFrames];
+ UInt32 framesRead = (UInt32)[buffer numFrames];
// TODO - check if framesRead is > 512
outputBufferList->mBuffers[0].mDataByteSize = outputDescription.mBytesPerFrame * outputDescription.mChannelsPerFrame * framesRead;
outputBufferList->mBuffers[0].mData = ((char *)convertedBuffer)+(convertedOffset++%kJMXAudioOutputConvertedBufferSize)*chunkSize;
diff --git a/entities/JMXAudioSpectrumAnalyzer.mm b/entities/JMXAudioSpectrumAnalyzer.mm
index 9fed618..3975db5 100644
--- a/entities/JMXAudioSpectrumAnalyzer.mm
+++ b/entities/JMXAudioSpectrumAnalyzer.mm
@@ -179,7 +179,7 @@ static int _defaultFrequencies[kJMXAudioSpectrumNumFrequencies] =
break;
case 2:
{
- UInt32 numFrames = [sample numFrames];
+ UInt32 numFrames = (UInt32)[sample numFrames];
for (int j = 0; j < numFrames; j++) {
uint8_t *frame = ((uint8_t *)bufferList->mBuffers[0].mData) + (j*8);
memcpy((u_char *)deinterleavedBuffer->mBuffers[0].mData+(j*4), frame, 4);
@@ -203,7 +203,7 @@ static int _defaultFrequencies[kJMXAudioSpectrumNumFrequencies] =
// TODO - error messages
return;
}
- [analyzer processForwards:[sample numFrames] input:deinterleavedBuffer];
+ [analyzer processForwards:(UInt32)[sample numFrames] input:deinterleavedBuffer];
[analyzer getMagnitude:spectrumBuffer min:minAmp max:maxAmp];
@@ -244,7 +244,7 @@ static int _defaultFrequencies[kJMXAudioSpectrumNumFrequencies] =
- (int)numberOfFrequencies
{
- return [frequencies count];
+ return (int)[frequencies count];
}
- (int)frequencyAtIndex:(NSUInteger)index
@@ -274,7 +274,7 @@ static v8::Handle<Value> frequency(const Arguments& args)
HandleScope handleScope;
JMXAudioSpectrumAnalyzer *entity = (JMXAudioSpectrumAnalyzer *)args.Holder()->GetPointerFromInternalField(0);
v8::Handle<Value> arg = args[0];
- int freq = args[0]->IntegerValue();
+ int freq = (int)args[0]->IntegerValue();
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *label = freq < 1000
? [NSString stringWithFormat:@"%d", freq]
diff --git a/entities/JMXScriptEntity.mm b/entities/JMXScriptEntity.mm
index 4977daa..099ef64 100644
--- a/entities/JMXScriptEntity.mm
+++ b/entities/JMXScriptEntity.mm
@@ -316,7 +316,7 @@ static v8::Handle<Value>GetEntities(Local<String> name, const AccessorInfo& info
JMXScriptEntity *entity = (JMXScriptEntity *)info.Holder()->GetPointerFromInternalField(0);
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSArray *entities = [entity elementsForName:@"Entities"];
- v8::Handle<Array> list = Array::New(entities.count);
+ v8::Handle<Array> list = Array::New((int)entities.count);
if (entities.count) {
JMXElement *holder = [entities objectAtIndex:0];
int cnt = 0;
diff --git a/entities/JMXVideoCapture.mm b/entities/JMXVideoCapture.mm
index 7643a60..ea7bb8c 100644
--- a/entities/JMXVideoCapture.mm
+++ b/entities/JMXVideoCapture.mm
@@ -79,7 +79,7 @@ static v8::Handle<Value> AvailableDevices(const Arguments& args)
Class objcClass = (Class)External::Cast(*(args.Holder()->Get(String::NewSymbol("_objcClass"))))->Value();
availableDevices = [objcClass availableDevices];
}
- v8::Handle<Array> list = v8::Array::New([availableDevices count]);
+ v8::Handle<Array> list = v8::Array::New((int)[availableDevices count]);
for (int i = 0; i < [availableDevices count]; i++) {
list->Set(Number::New(i), String::New([[availableDevices objectAtIndex:i] UTF8String]));
}
diff --git a/entities/JMXVideoFilter.mm b/entities/JMXVideoFilter.mm
index e66a445..77b00e5 100644
--- a/entities/JMXVideoFilter.mm
+++ b/entities/JMXVideoFilter.mm
@@ -98,7 +98,7 @@ static v8::Handle<Value> AvailableFilters(const Arguments& args)
Class objcClass = (Class)External::Cast(*(args.Holder()->Get(String::NewSymbol("_objcClass"))))->Value();
availableFilters = [objcClass availableFilters];
}
- v8::Handle<Array> list = v8::Array::New([availableFilters count]);
+ v8::Handle<Array> list = v8::Array::New((int)[availableFilters count]);
for (int i = 0; i < [availableFilters count]; i++) {
list->Set(Number::New(i), String::New([[availableFilters objectAtIndex:i] UTF8String]));
}
diff --git a/entities/audio/JMXAudioFileEntity.mm b/entities/audio/JMXAudioFileEntity.mm
index 87158d3..14a2712 100644
--- a/entities/audio/JMXAudioFileEntity.mm
+++ b/entities/audio/JMXAudioFileEntity.mm
@@ -179,7 +179,7 @@ static v8::Handle<Value>SupportedFileTypes(const Arguments& args)
Class<JMXFileRead> objcClass = (Class)External::Cast(*(args.Holder()->Get(String::NewSymbol("_objcClass"))))->Value();
supportedTypes = [objcClass supportedFileTypes];
}
- v8::Handle<Array> list = v8::Array::New([supportedTypes count]);
+ v8::Handle<Array> list = v8::Array::New((int)[supportedTypes count]);
for (int i = 0; i < [supportedTypes count]; i++)
list->Set(Number::New(i), String::New([[supportedTypes objectAtIndex:i] UTF8String]));
[pool release];
diff --git a/entities/audio_outputs/JMXCoreAudioOutput.mm b/entities/audio_outputs/JMXCoreAudioOutput.mm
index f90ed5d..48d0eab 100644
--- a/entities/audio_outputs/JMXCoreAudioOutput.mm
+++ b/entities/audio_outputs/JMXCoreAudioOutput.mm
@@ -133,7 +133,7 @@ static v8::Handle<Value>availableDevices(const Arguments& args)
HandleScope handleScope;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSArray *availableDevices = [JMXCoreAudioOutput availableDevices];
- v8::Handle<Array> list = Array::New([availableDevices count]);
+ v8::Handle<Array> list = Array::New((int)[availableDevices count]);
for (int i = 0; i < [availableDevices count]; i++) {
list->Set(i, String::New([[availableDevices objectAtIndex:i] UTF8String]));
}
diff --git a/entities/video/JMXImageEntity.mm b/entities/video/JMXImageEntity.mm
index d2b49fa..761d626 100644
--- a/entities/video/JMXImageEntity.mm
+++ b/entities/video/JMXImageEntity.mm
@@ -222,7 +222,7 @@ static v8::Handle<Value>SupportedFileTypes(const Arguments& args)
Class<JMXFileRead> objcClass = (Class)External::Cast(*(args.Holder()->Get(String::NewSymbol("_objcClass"))))->Value();
supportedTypes = [objcClass supportedFileTypes];
}
- v8::Handle<Array> list = v8::Array::New([supportedTypes count]);
+ v8::Handle<Array> list = v8::Array::New((int)[supportedTypes count]);
for (int i = 0; i < [supportedTypes count]; i++)
list->Set(Number::New(i), String::New([[supportedTypes objectAtIndex:i] UTF8String]));
[pool release];
diff --git a/entities/video/JMXQtMovieEntity.mm b/entities/video/JMXQtMovieEntity.mm
index 2b48742..b5003e8 100644
--- a/entities/video/JMXQtMovieEntity.mm
+++ b/entities/video/JMXQtMovieEntity.mm
@@ -178,7 +178,7 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict,
int numFrames = buffer->mDataByteSize / desc->mBytesPerFrame;
for (int n = 0; n < numFrames; n+= 512) {
AudioBuffer newBuffer;
- newBuffer.mDataByteSize = MIN((numFrames - n) * desc->mBytesPerFrame, chunkSize);
+ newBuffer.mDataByteSize = (UInt32)MIN((numFrames - n) * desc->mBytesPerFrame, chunkSize);
newBuffer.mNumberChannels = buffer->mNumberChannels;
newBuffer.mData = (char *)buffer->mData + (n * desc->mBytesPerFrame);
JMXAudioBuffer *outputBuffer = [JMXAudioBuffer audioBufferWithCoreAudioBuffer:&newBuffer andFormat:desc];
@@ -600,7 +600,7 @@ static v8::Handle<Value>SupportedFileTypes(const Arguments& args)
Class<JMXFileRead> objcClass = (Class)External::Cast(*(args.Holder()->Get(String::NewSymbol("_objcClass"))))->Value();
supportedTypes = [objcClass supportedFileTypes];
}
- v8::Handle<Array> list = v8::Array::New([supportedTypes count]);
+ v8::Handle<Array> list = v8::Array::New((int)[supportedTypes count]);
for (int i = 0; i < [supportedTypes count]; i++)
list->Set(Number::New(i), String::New([[supportedTypes objectAtIndex:i] UTF8String]));
[pool release];