summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Guzzo <andrea.guzzo@booking.com>2013-07-09 08:44:48 (GMT)
committer Andrea Guzzo <andrea.guzzo@booking.com>2013-07-09 08:44:48 (GMT)
commite87bf8ecca55b43e7c252bc837ed0bdbb64b0613 (patch)
tree96837b817cb0ec476428b25805c8b5082bd91c8e
parenta6034cd84bfb38679179ec39dc09038513fb9ea8 (diff)
the core now builds without warnings
-rwxr-xr-xHID Utilities/HID_Config_Utilities.c4
-rwxr-xr-xHID Utilities/HID_Name_Lookup.c2
-rwxr-xr-xHID Utilities/HID_Utilities.c2
-rwxr-xr-xHID Utilities/IOHIDManager/IOHIDDevice_.c10
-rw-r--r--JMX.xcodeproj/project.pbxproj24
-rw-r--r--JMXGlobals.h14
-rw-r--r--core/JMXAudioBuffer.h6
-rw-r--r--core/JMXAudioDevice.m7
-rw-r--r--core/JMXCDATA.mm6
-rw-r--r--core/JMXCanvasGradient.mm2
-rw-r--r--core/JMXDrawPath.mm8
-rw-r--r--core/JMXOpenGLDraw.mm6
-rw-r--r--core/JMXPin.mm4
-rw-r--r--core/JMXPoint.mm4
-rw-r--r--core/JMXRect.mm8
-rw-r--r--core/JMXScript.mm4
-rw-r--r--core/JMXSize.mm4
-rw-r--r--core/JMXTextRenderer.h8
-rw-r--r--core/JMXV8.h2
-rw-r--r--core/JMXV8PropertyAccessors.mm4
-rw-r--r--core/NSColor+V8.mm6
-rw-r--r--core/NSDictionary+V8.mm4
-rw-r--r--core/NSString+V8.mm2
-rw-r--r--entities/JMXScriptEntity.mm2
-rw-r--r--entities/video_filters/JMXCoreImageFilter.mm13
-rw-r--r--entities/video_outputs/JMXOpenGLScreen.mm4
-rw-r--r--node.js/deps/cares/src/ares_process.c2
-rw-r--r--node.js/src/node.cc2
28 files changed, 81 insertions, 83 deletions
diff --git a/HID Utilities/HID_Config_Utilities.c b/HID Utilities/HID_Config_Utilities.c
index 90bc1c7..ec84314 100755
--- a/HID Utilities/HID_Config_Utilities.c
+++ b/HID Utilities/HID_Config_Utilities.c
@@ -264,7 +264,7 @@ Boolean HIDConfigureAction( IOHIDDeviceRef* outIOHIDDeviceRef, IOHIDElementRef *
vendorID,
productID,
tIOHIDElementRef,
- cookie,
+ (void *)cookie,
(long unsigned int) usagePage,
(long unsigned int) usage ); fflush( stdout );
@@ -395,7 +395,7 @@ Boolean HIDSaveElementPref( const CFStringRef inKeyCFStringRef,
IOHIDElementCookie eleCookie = IOHIDElementGetCookie( inIOHIDElementRef );
CFStringRef prefCFStringRef = CFStringCreateWithFormat( kCFAllocatorDefault, NULL,
- CFSTR( "d:{v:%ld, p:%ld, l:%ld, p:%ld, u:%ld}, e:{p:%ld, u:%ld, c:%ld}" ),
+ CFSTR( "d:{v:%ld, p:%ld, l:%ld, p:%d, u:%d}, e:{p:%d, u:%d, c:%d}" ),
vendorID,
productID,
locID,
diff --git a/HID Utilities/HID_Name_Lookup.c b/HID Utilities/HID_Name_Lookup.c
index 4a720db..9a4d086 100755
--- a/HID Utilities/HID_Name_Lookup.c
+++ b/HID Utilities/HID_Name_Lookup.c
@@ -669,7 +669,7 @@ static Boolean hu_XMLSearchForElementNameByCookie( long inVendorID, long inProdu
if ( CFDictionaryGetValueIfPresent( productCFDictionaryRef, kNameKeyCFStringRef, ( const void ** ) & productCFStringRef ) ) {
// CFShow( productCFStringRef );
}
- cookieKeyCFStringRef = CFStringCreateWithFormat( kCFAllocatorDefault, NULL, CFSTR( "%ld" ), inCookie );
+ cookieKeyCFStringRef = CFStringCreateWithFormat( kCFAllocatorDefault, NULL, CFSTR( "%d" ), inCookie );
if ( CFDictionaryGetValueIfPresent( productCFDictionaryRef, cookieKeyCFStringRef, ( const void ** ) & cookieCFStringRef ) ) {
#if VERBOSE_ELEMENT_NAMES
diff --git a/HID Utilities/HID_Utilities.c b/HID Utilities/HID_Utilities.c
index 81c373e..c19be5d 100755
--- a/HID Utilities/HID_Utilities.c
+++ b/HID Utilities/HID_Utilities.c
@@ -281,7 +281,7 @@ void HIDRebuildDevices( void ) {
UInt32 HIDCountDevices( void )
{
- return CFArrayGetCount( gDeviceCFArrayRef );
+ return (UInt32)CFArrayGetCount( gDeviceCFArrayRef );
}
// ---------------------------------
diff --git a/HID Utilities/IOHIDManager/IOHIDDevice_.c b/HID Utilities/IOHIDManager/IOHIDDevice_.c
index 2f78897..d6a36a0 100755
--- a/HID Utilities/IOHIDManager/IOHIDDevice_.c
+++ b/HID Utilities/IOHIDManager/IOHIDDevice_.c
@@ -291,7 +291,7 @@ long IOHIDDevice_GetLocationID( IOHIDDeviceRef inIOHIDDeviceRef )
uint32_t IOHIDDevice_GetUsage( IOHIDDeviceRef inIOHIDDeviceRef )
{
uint32_t result = 0;
- ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDDeviceUsageKey ), ( long * ) &result );
+ ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDDeviceUsageKey ), (long *)&result );
return result;
} // IOHIDDevice_GetUsage
@@ -309,7 +309,7 @@ uint32_t IOHIDDevice_GetUsage( IOHIDDeviceRef inIOHIDDeviceRef )
uint32_t IOHIDDevice_GetUsagePage( IOHIDDeviceRef inIOHIDDeviceRef )
{
uint32_t result = 0;
- ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDDeviceUsagePageKey ), &result );
+ ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDDeviceUsagePageKey ), (long *)&result );
return result;
} // IOHIDDevice_GetUsagePage
@@ -344,7 +344,7 @@ CFArrayRef IOHIDDevice_GetUsagePairs( IOHIDDeviceRef inIOHIDDeviceRef )
uint32_t IOHIDDevice_GetPrimaryUsage( IOHIDDeviceRef inIOHIDDeviceRef )
{
long result = 0;
- ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDPrimaryUsageKey ), &result );
+ ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDPrimaryUsageKey ), (long *)&result );
return result;
}
@@ -362,7 +362,7 @@ uint32_t IOHIDDevice_GetPrimaryUsage( IOHIDDeviceRef inIOHIDDeviceRef )
uint32_t IOHIDDevice_GetPrimaryUsagePage( IOHIDDeviceRef inIOHIDDeviceRef )
{
long result = 0;
- ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDPrimaryUsagePageKey ), &result );
+ ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDPrimaryUsagePageKey ), (long *)&result );
return result;
}
@@ -380,7 +380,7 @@ uint32_t IOHIDDevice_GetPrimaryUsagePage( IOHIDDeviceRef inIOHIDDeviceRef )
long IOHIDDevice_GetMaxInputReportSize( IOHIDDeviceRef inIOHIDDeviceRef )
{
long result = 0;
- ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDMaxInputReportSizeKey ), &result );
+ ( void ) IOHIDDevice_GetLongProperty( inIOHIDDeviceRef, CFSTR( kIOHIDMaxInputReportSizeKey ), (long *)&result );
return result;
}
diff --git a/JMX.xcodeproj/project.pbxproj b/JMX.xcodeproj/project.pbxproj
index 2676dcb..dbe5feb 100644
--- a/JMX.xcodeproj/project.pbxproj
+++ b/JMX.xcodeproj/project.pbxproj
@@ -281,7 +281,6 @@
AA6D4724178AF0B40020BD4C /* windows_port.c in Sources */ = {isa = PBXBuildFile; fileRef = AA6D2D44178AF0A90020BD4C /* windows_port.c */; };
AA6D4725178AF0B40020BD4C /* http_parser.c in Sources */ = {isa = PBXBuildFile; fileRef = AA6D2D4A178AF0A90020BD4C /* http_parser.c */; };
AA6D4726178AF0B40020BD4C /* http_parser.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6D2D4C178AF0A90020BD4C /* http_parser.h */; };
- AA6D4727178AF0B40020BD4C /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = AA6D2D4E178AF0A90020BD4C /* Makefile */; };
AA6D4729178AF0B40020BD4C /* url_parser.c in Sources */ = {isa = PBXBuildFile; fileRef = AA6D2D51178AF0A90020BD4C /* url_parser.c */; };
AA6D47F8178AF0B40020BD4C /* gyp_dummy.c in Sources */ = {isa = PBXBuildFile; fileRef = AA6D301E178AF0AA0020BD4C /* gyp_dummy.c */; };
AA6D480E178AF0B40020BD4C /* lib1.hpp in Headers */ = {isa = PBXBuildFile; fileRef = AA6D30B5178AF0AA0020BD4C /* lib1.hpp */; };
@@ -690,10 +689,8 @@
AA6D5264178AF0B50020BD4C /* v8checks.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6D45CB178AF0B40020BD4C /* v8checks.h */; };
AA6D5265178AF0B50020BD4C /* v8conversions.cc in Sources */ = {isa = PBXBuildFile; fileRef = AA6D45CC178AF0B40020BD4C /* v8conversions.cc */; };
AA6D5266178AF0B50020BD4C /* v8conversions.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6D45CD178AF0B40020BD4C /* v8conversions.h */; };
- AA6D5267178AF0B50020BD4C /* v8dll-main.cc in Sources */ = {isa = PBXBuildFile; fileRef = AA6D45CE178AF0B40020BD4C /* v8dll-main.cc */; };
AA6D5268178AF0B50020BD4C /* v8globals.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6D45CF178AF0B40020BD4C /* v8globals.h */; };
AA6D5269178AF0B50020BD4C /* v8memory.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6D45D0178AF0B40020BD4C /* v8memory.h */; };
- AA6D526B178AF0B50020BD4C /* v8preparserdll-main.cc in Sources */ = {isa = PBXBuildFile; fileRef = AA6D45D2178AF0B40020BD4C /* v8preparserdll-main.cc */; };
AA6D526C178AF0B50020BD4C /* v8threads.cc in Sources */ = {isa = PBXBuildFile; fileRef = AA6D45D3178AF0B40020BD4C /* v8threads.cc */; };
AA6D526D178AF0B50020BD4C /* v8threads.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6D45D4178AF0B40020BD4C /* v8threads.h */; };
AA6D526E178AF0B50020BD4C /* v8utils.cc in Sources */ = {isa = PBXBuildFile; fileRef = AA6D45D5178AF0B40020BD4C /* v8utils.cc */; };
@@ -736,9 +733,8 @@
AA6D5296178AF0B50020BD4C /* zone-inl.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6D45FE178AF0B40020BD4C /* zone-inl.h */; };
AA6D5297178AF0B50020BD4C /* zone.cc in Sources */ = {isa = PBXBuildFile; fileRef = AA6D45FF178AF0B40020BD4C /* zone.cc */; };
AA6D5298178AF0B50020BD4C /* zone.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6D4600178AF0B40020BD4C /* zone.h */; };
- AA6D529C178AF0B50020BD4C /* gcmole.cc in Sources */ = {isa = PBXBuildFile; fileRef = AA6D4612178AF0B40020BD4C /* gcmole.cc */; };
- AA6D529F178AF0B50020BD4C /* oom_dump.cc in Sources */ = {isa = PBXBuildFile; fileRef = AA6D4626178AF0B40020BD4C /* oom_dump.cc */; };
AA6D52CB178AFD160020BD4C /* node_natives.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6D52CA178AFD150020BD4C /* node_natives.h */; };
+ AA6D52CC178C04C70020BD4C /* libJMX-Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2C746316DFA74000B623C2 /* libJMX-Core.a */; };
AA70C831178AACF700190C38 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA70C830178AACF700190C38 /* Foundation.framework */; };
AA75F38914F706FA00F1A214 /* drag_movies.js in Deploy JS examples */ = {isa = PBXBuildFile; fileRef = AA75F38814F706E200F1A214 /* drag_movies.js */; };
AA8F817612CB236700EA8543 /* JMXTextPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = AA8F817512CB236700EA8543 /* JMXTextPanel.m */; };
@@ -4498,6 +4494,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ AA6D52CC178C04C70020BD4C /* libJMX-Core.a in Frameworks */,
AA0A89BD1675E02800FF784F /* AudioUnit.framework in Frameworks */,
82456BCC1223DCA700236FE4 /* QuartzCore.framework in Frameworks */,
);
@@ -14277,7 +14274,6 @@
AA6D4721178AF0B40020BD4C /* inet_ntop.c in Sources */,
AA6D4724178AF0B40020BD4C /* windows_port.c in Sources */,
AA6D4725178AF0B40020BD4C /* http_parser.c in Sources */,
- AA6D4727178AF0B40020BD4C /* Makefile in Sources */,
AA6D4729178AF0B40020BD4C /* url_parser.c in Sources */,
AA6D47F8178AF0B40020BD4C /* gyp_dummy.c in Sources */,
AA6D500B178AF0B50020BD4C /* fs-poll.c in Sources */,
@@ -14425,8 +14421,6 @@
AA6D5260178AF0B50020BD4C /* v8-counters.cc in Sources */,
AA6D5262178AF0B50020BD4C /* v8.cc in Sources */,
AA6D5265178AF0B50020BD4C /* v8conversions.cc in Sources */,
- AA6D5267178AF0B50020BD4C /* v8dll-main.cc in Sources */,
- AA6D526B178AF0B50020BD4C /* v8preparserdll-main.cc in Sources */,
AA6D526C178AF0B50020BD4C /* v8threads.cc in Sources */,
AA6D526E178AF0B50020BD4C /* v8utils.cc in Sources */,
AA6D5270178AF0B50020BD4C /* variables.cc in Sources */,
@@ -14450,8 +14444,6 @@
AA6D5293178AF0B50020BD4C /* simulator-x64.cc in Sources */,
AA6D5295178AF0B50020BD4C /* stub-cache-x64.cc in Sources */,
AA6D5297178AF0B50020BD4C /* zone.cc in Sources */,
- AA6D529C178AF0B50020BD4C /* gcmole.cc in Sources */,
- AA6D529F178AF0B50020BD4C /* oom_dump.cc in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -14529,10 +14521,12 @@
GCC_PREFIX_HEADER = "JMX-Core_Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
+ "ENABLE_DISASSEMBLER=1",
+ "OBJECT_PRINT=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
HEADER_SEARCH_PATHS = "$PROJECT_DIR/**";
LIBRARY_SEARCH_PATHS = (
@@ -14583,7 +14577,7 @@
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "JMX-Core_Prefix.pch";
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
HEADER_SEARCH_PATHS = "$PROJECT_DIR/**";
LIBRARY_SEARCH_PATHS = (
@@ -14668,6 +14662,7 @@
QuickTime,
);
PRODUCT_NAME = JMX;
+ VALID_ARCHS = x86_64;
};
name = Debug;
};
@@ -14721,6 +14716,7 @@
);
PRODUCT_NAME = JMX;
STRIP_INSTALLED_PRODUCT = YES;
+ VALID_ARCHS = x86_64;
};
name = Release;
};
@@ -14753,7 +14749,7 @@
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = NO;
- VALID_ARCHS = "i386 x86_64";
+ VALID_ARCHS = x86_64;
};
name = Debug;
};
@@ -14787,7 +14783,7 @@
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = YES;
- VALID_ARCHS = "i386 x86_64";
+ VALID_ARCHS = x86_64;
};
name = Release;
};
diff --git a/JMXGlobals.h b/JMXGlobals.h
index 91e51a8..a86e7cc 100644
--- a/JMXGlobals.h
+++ b/JMXGlobals.h
@@ -8,6 +8,10 @@
*/
// Generic syslog based logging
+
+#ifndef __JMXGLOBALS_H__
+#define __JMXGLOBALS_H__
+
#include <syslog.h>
#import <Foundation/NSObjCRuntime.h>
@@ -19,9 +23,9 @@
#define WARNING(fmt,args...) do { if (verbose >= LOG_WARNING) syslog(LOG_WARNING, "W: " fmt, ## args); } while (0)
#define NOTICE(fmt,args...) do { if (verbose >= LOG_NOTICE) syslog(LOG_NOTICE, "N: " fmt, ## args); } while (0)
#define INFO(fmt,args...) do { if (verbose >= LOG_INFO) syslog(LOG_INFO, "I: " fmt, ## args); } while (0)
-#define DEBUG(fmt,args...) do { if (verbose >= LOG_DEBUG) syslog(LOG_DEBUG, "D:%s:%d " fmt, __FUNCTION__, __LINE__, ## args); } while (0)
-#define DEBUG2(fmt,args...) do { if (verbose >= LOG_DEBUG2) syslog(LOG_DEBUG, "D2:%s:%d " fmt, __FUNCTION__, __LINE__, ## args); } while (0)
-#define DEBUG3(fmt,args...) do { if (verbose >= LOG_DEBUG3) syslog(LOG_DEBUG, "D3:%s:%d " fmt, __FUNCTION__, __LINE__, ## args); } while (0)
+#define DBG(fmt,args...) do { if (verbose >= LOG_DEBUG) syslog(LOG_DEBUG, "D:%s:%d " fmt, __FUNCTION__, __LINE__, ## args); } while (0)
+#define DBG2(fmt,args...) do { if (verbose >= LOG_DEBUG2) syslog(LOG_DEBUG, "D2:%s:%d " fmt, __FUNCTION__, __LINE__, ## args); } while (0)
+#define DBG3(fmt,args...) do { if (verbose >= LOG_DEBUG3) syslog(LOG_DEBUG, "D3:%s:%d " fmt, __FUNCTION__, __LINE__, ## args); } while (0)
// Two versions that increase (decrement) and decrease (increment) the priority
#define DEBDEC(n,fmt,args...) do { if (verbose >= LOG_DEBUG-(n)) syslog(LOG_DEBUG-(n), "V%d:%s:%d " fmt, 1-n, __FUNCTION__, __LINE__, ## args); } while (0)
#define DEBINC(n,fmt,args...) do { if (verbose >= LOG_DEBUG+(n)) syslog(LOG_DEBUG+(n), "V%d:%s:%d " fmt, 1+n, __FUNCTION__, __LINE__, ## args); } while (0)
@@ -41,4 +45,6 @@
}\
} while (0)
-extern int verbose; \ No newline at end of file
+extern int verbose;
+
+#endif \ No newline at end of file
diff --git a/core/JMXAudioBuffer.h b/core/JMXAudioBuffer.h
index ec0d3f6..fcec5df 100644
--- a/core/JMXAudioBuffer.h
+++ b/core/JMXAudioBuffer.h
@@ -146,11 +146,7 @@
@return the samplerate
*/
- (NSUInteger)sampleRate;
-/*!
- @method numChannels
- @return the number of channels
- */
-- (NSUInteger)numChannels;
+
/*!
@method fillComplexBuffer:countPointer:offset:
@abstract fill the encapsulated buffer (or bufferlist) with the provided data
diff --git a/core/JMXAudioDevice.m b/core/JMXAudioDevice.m
index 47cea0e..d4d0166 100644
--- a/core/JMXAudioDevice.m
+++ b/core/JMXAudioDevice.m
@@ -687,10 +687,11 @@ static NSString * _ClockSourceNameForID ( AudioDeviceID theDeviceID, JMXAudioDev
propertyAddress.mSelector = kAudioDevicePropertyDataSources;
propertyAddress.mScope = (theDirection == kJMXAudioOutput) ? kAudioDevicePropertyScopeOutput : kAudioDevicePropertyScopeInput;
propertyAddress.mElement = kAudioObjectPropertyElementWildcard;
- AudioObjectGetPropertyDataSize( deviceID, &propertyAddress, 0, NULL, &theSize );
-
+
+ theStatus = AudioObjectGetPropertyDataSize( deviceID, &propertyAddress, 0, NULL, &theSize );
if (theStatus != 0)
return rv;
+
theSourceIDs = (UInt32 *) malloc ( theSize );
numSources = theSize / sizeof(UInt32);
theStatus = AudioObjectGetPropertyData( deviceID, &propertyAddress, 0, NULL, &theSize, theSourceIDs );
@@ -740,7 +741,7 @@ static NSString * _ClockSourceNameForID ( AudioDeviceID theDeviceID, JMXAudioDev
propertyAddress.mSelector = kAudioDevicePropertyDataSources;
propertyAddress.mScope = (theDirection == kJMXAudioOutput) ? kAudioDevicePropertyScopeOutput : kAudioDevicePropertyScopeInput;
propertyAddress.mElement = kAudioObjectPropertyElementWildcard;
- AudioObjectGetPropertyDataSize( deviceID, &propertyAddress, 0, NULL, &theSize );
+ theStatus = AudioObjectGetPropertyDataSize( deviceID, &propertyAddress, 0, NULL, &theSize );
if (theStatus != 0)
return;
theSourceIDs = (UInt32 *) malloc ( theSize );
diff --git a/core/JMXCDATA.mm b/core/JMXCDATA.mm
index e09af10..5f3c1ae 100644
--- a/core/JMXCDATA.mm
+++ b/core/JMXCDATA.mm
@@ -46,7 +46,7 @@ static v8::Handle<Value> GetData(Local<String> name, const AccessorInfo& info)
JMXCDATA *cdata = (JMXCDATA *)info.Holder()->GetPointerFromInternalField(0);
if (cdata) {
NSData *data = cdata.data;
- return handleScope.Close(v8::String::New((char *)[data bytes], [data length]));
+ return handleScope.Close(v8::String::New((char *)[data bytes], (int)[data length]));
}
return handleScope.Close(Undefined());
}
@@ -74,7 +74,7 @@ static v8::Handle<Value> GetLength(Local<String> name, const AccessorInfo& info)
JMXCDATA *cdata = (JMXCDATA *)info.Holder()->GetPointerFromInternalField(0);
if (cdata) {
NSData *data = cdata.data;
- return handleScope.Close(v8::Integer::New([data length]));
+ return handleScope.Close(v8::Integer::New((int)[data length]));
}
return handleScope.Close(Undefined());
}
@@ -88,7 +88,7 @@ static v8::Handle<Value> SubstringData(const Arguments& args)
v8::Handle<Integer> count = args[1]->ToInteger();
char *data = (char *)malloc(count->Value());
[cdata.data getBytes:&data range:NSMakeRange(offset->Value(), count->Value())];
- v8::Handle<String> outString = String::New(data, count->Value());
+ v8::Handle<String> outString = String::New(data, (int)count->Value());
free(data);
return handleScope.Close(outString);
}
diff --git a/core/JMXCanvasGradient.mm b/core/JMXCanvasGradient.mm
index 4a9bf6f..57b4e88 100644
--- a/core/JMXCanvasGradient.mm
+++ b/core/JMXCanvasGradient.mm
@@ -85,7 +85,7 @@ JMXV8_EXPORT_CLASS(JMXCanvasGradient)
- (void)addColor:(NSColor *)color stop:(NSUInteger)offset
{
[colors addObject:color];
- [locations addObject:[NSNumber numberWithUnsignedInt:offset]];
+ [locations addObject:[NSNumber numberWithUnsignedInt:(uint)offset]];
}
- (CGGradientRef)gradientRef
diff --git a/core/JMXDrawPath.mm b/core/JMXDrawPath.mm
index a13fdb3..7e201c7 100644
--- a/core/JMXDrawPath.mm
+++ b/core/JMXDrawPath.mm
@@ -258,13 +258,13 @@ using namespace v8;
CGContextSetFillPattern(context, [(JMXCanvasPattern *)fillColor patternRef], [(JMXCanvasPattern *)fillColor components]);
} else if ([fillColor isKindOfClass:[JMXCanvasGradient class]]) {
JMXCanvasGradient *gradient = (JMXCanvasGradient *)fillColor;
- CGPoint center = CGPointMake(center.x, center.y);
+ CGPoint centerPoint = CGPointMake(center.x, center.y);
if (gradient.mode == kJMXCanvasGradientLinear) {
- CGPoint startPoint = CGPointMake(center.x - radius, center.y);
- CGPoint endPoint = CGPointMake(center.x + radius, center.y);
+ CGPoint startPoint = CGPointMake(centerPoint.x - radius, centerPoint.y);
+ CGPoint endPoint = CGPointMake(centerPoint.x + radius, centerPoint.y);
CGContextDrawLinearGradient(context, [gradient gradientRef], startPoint, endPoint, 0);
} else if (gradient.mode == kJMXCanvasGradientRadial) {
- CGContextDrawRadialGradient(context, [gradient gradientRef], center, 0, center, radius, 0);
+ CGContextDrawRadialGradient(context, [gradient gradientRef], centerPoint, 0, centerPoint, radius, 0);
}
}
diff --git a/core/JMXOpenGLDraw.mm b/core/JMXOpenGLDraw.mm
index 64a3b55..6249339 100644
--- a/core/JMXOpenGLDraw.mm
+++ b/core/JMXOpenGLDraw.mm
@@ -78,7 +78,7 @@
// Initialize texture
glBindTexture(GL_TEXTURE_2D, textureID);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, _width, _height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)_width, (GLsizei)_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
// Set texture parameters.
@@ -87,7 +87,7 @@
// Initialize depth renderbuffer.
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rbID);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, _width, _height);
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, (GLsizei)_width, (GLsizei)_height);
// Attach framebuffer to depth renderbuffer.
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, rbID);
@@ -100,7 +100,7 @@
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboID);
glPushAttrib(GL_VIEWPORT_BIT);
- glViewport(0, 0, _width, _height);
+ glViewport(0, 0, (GLsizei)_width, (GLsizei)_height);
glClearColor(1, 1, 1, 1);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
diff --git a/core/JMXPin.mm b/core/JMXPin.mm
index ca5e1a4..1a0a7a6 100644
--- a/core/JMXPin.mm
+++ b/core/JMXPin.mm
@@ -452,7 +452,7 @@ using namespace v8;
- (NSString *)description
{
- NSString *ownerName;
+ NSString *ownerName = @"";
if ([owner respondsToSelector:@selector(name)])
ownerName = [owner performSelector:@selector(name)];
return [NSString stringWithFormat:@"%@:%@", ownerName, label];
@@ -602,7 +602,7 @@ using namespace v8;
currentSender = sender;
else
currentSender = self;
- JMXPinSignal *signal;
+ JMXPinSignal *signal = nil;
@synchronized(self) {
if (owner)
diff --git a/core/JMXPoint.mm b/core/JMXPoint.mm
index 1af5b35..b7f892e 100644
--- a/core/JMXPoint.mm
+++ b/core/JMXPoint.mm
@@ -168,8 +168,8 @@ v8::Handle<v8::Value> JMXPointJSConstructor(const v8::Arguments& args)
HandleScope handleScope;
//v8::Locker locker;
v8::Persistent<FunctionTemplate> objectTemplate = [JMXPoint jsObjectTemplate];
- int x = 0;
- int y = 0;
+ int64_t x = 0;
+ int64_t y = 0;
if (args.Length() >= 2) {
x = args[0]->IntegerValue();
y = args[1]->IntegerValue();
diff --git a/core/JMXRect.mm b/core/JMXRect.mm
index bc71ffc..5e4354e 100644
--- a/core/JMXRect.mm
+++ b/core/JMXRect.mm
@@ -176,10 +176,10 @@ v8::Handle<v8::Value> JMXRectJSConstructor(const v8::Arguments& args)
HandleScope handleScope;
//v8::Locker locker;
v8::Persistent<FunctionTemplate> objectTemplate = [JMXRect jsObjectTemplate];
- int x = 0;
- int y = 0;
- int w = 0;
- int h = 0;
+ int64_t x = 0;
+ int64_t y = 0;
+ int64_t w = 0;
+ int64_t h = 0;
if (args.Length() >= 2) {
x = args[0]->IntegerValue();
y = args[1]->IntegerValue();
diff --git a/core/JMXScript.mm b/core/JMXScript.mm
index 9c26788..aae2688 100644
--- a/core/JMXScript.mm
+++ b/core/JMXScript.mm
@@ -223,7 +223,7 @@ static v8::Handle<Value> ListDir(const Arguments& args) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSArray *content = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[NSString stringWithUTF8String:*value] error:nil];
if (content) {
- v8::Handle<Array> list = Array::New([content count]);
+ v8::Handle<Array> list = Array::New((int)[content count]);
int cnt = 0;
for (NSString *path in content) {
list->Set(cnt++, String::New([path UTF8String]));
@@ -274,7 +274,7 @@ static v8::Handle<Value> DumpDOM(const Arguments& args) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
HandleScope scope;
NSString *xmlString = [[JMXContext sharedContext] dumpDOM];
- v8::Handle<String> output = String::New([xmlString UTF8String], [xmlString length]);
+ v8::Handle<String> output = String::New([xmlString UTF8String], (int)[xmlString length]);
[pool release];
return scope.Close(output);
}
diff --git a/core/JMXSize.mm b/core/JMXSize.mm
index ff238f4..12c570d 100644
--- a/core/JMXSize.mm
+++ b/core/JMXSize.mm
@@ -160,8 +160,8 @@ v8::Handle<v8::Value> JMXSizeJSConstructor(const v8::Arguments& args)
HandleScope handleScope;
//v8::Locker locker;
v8::Persistent<FunctionTemplate> objectTemplate = [JMXSize jsObjectTemplate];
- int width = 0;
- int height = 0;
+ int64_t width = 0;
+ int64_t height = 0;
if (args.Length() >= 2) {
width = args[0]->IntegerValue();
height = args[1]->IntegerValue();
diff --git a/core/JMXTextRenderer.h b/core/JMXTextRenderer.h
index 2bae4d7..133685a 100644
--- a/core/JMXTextRenderer.h
+++ b/core/JMXTextRenderer.h
@@ -59,14 +59,6 @@
- (void) setString:(NSString *)aString font:(NSFont *)font textColor:(NSColor *)textColor boxColor:(NSColor *)boxColor borderColor:(NSColor *)borderColor;
/*!
- @method initWithAttributedString:
- @param aString the string
- @param attribs NSDictionary containing attributes to use for the internally used NSAttributedString
- @return the initialized instance
- */
-- (void) setString:(NSString *)aString withAttributes:(NSDictionary *)attribs;
-
-/*!
@method textColor
@return NSColor used to draw the text
*/
diff --git a/core/JMXV8.h b/core/JMXV8.h
index 2b99e72..cce4bad 100644
--- a/core/JMXV8.h
+++ b/core/JMXV8.h
@@ -111,7 +111,7 @@ static inline v8::Handle<v8::Object>JMXV8ObjectInstance(id<JMXV8> self)
{
//v8::Locker lock;
v8::HandleScope handle_scope;
- v8::Handle<v8::FunctionTemplate> objectTemplate = [[self class] jsObjectTemplate];
+ v8::Handle<v8::FunctionTemplate> objectTemplate = [[(id)self class] jsObjectTemplate];
v8::Persistent<v8::Object> jsInstance = v8::Persistent<v8::Object>::New(objectTemplate->InstanceTemplate()->NewInstance());
jsInstance.MakeWeak(static_cast<void *>([(NSObject *)self retain]), &JMXV8ObjectDestroy);
jsInstance->SetPointerInInternalField(0, self);
diff --git a/core/JMXV8PropertyAccessors.mm b/core/JMXV8PropertyAccessors.mm
index edd5184..ca4b9ad 100644
--- a/core/JMXV8PropertyAccessors.mm
+++ b/core/JMXV8PropertyAccessors.mm
@@ -52,7 +52,7 @@ v8::Handle<Value>GetObjectProperty(Local<String> name, const AccessorInfo& info)
if (obj && [obj respondsToSelector:selector]) {
id output = [obj performSelector:selector];
if ([output isKindOfClass:[NSString class]]) {
- Handle<String> string = String::New([(NSString *)output UTF8String], [(NSString *)output length]);
+ Handle<String> string = String::New([(NSString *)output UTF8String], (int)[(NSString *)output length]);
[pool drain];
return handle_scope.Close(string);
} else if ([output isKindOfClass:[NSNumber class]]) {
@@ -124,7 +124,7 @@ v8::Handle<Value>GetIntProperty(Local<String> name, const AccessorInfo& info)
{
//Locker lock;
HandleScope handle_scope;
- NSInteger ret = 0;
+ int32_t ret = 0;
String::Utf8Value value(name);
id obj = (id)info.Holder()->GetPointerFromInternalField(0);
diff --git a/core/NSColor+V8.mm b/core/NSColor+V8.mm
index d3c4724..d8d264d 100644
--- a/core/NSColor+V8.mm
+++ b/core/NSColor+V8.mm
@@ -126,7 +126,7 @@ void ConvertHSLToRGB (const CGFloat *hslComponents, CGFloat *rgbComponents) {
if (mainExpInitialized) {
int code = regexec(&exp, [cssString UTF8String], 1, matches, 0);
if (code == 0) {
- int length = matches[0].rm_eo-matches[0].rm_so;
+ int64_t length = matches[0].rm_eo-matches[0].rm_so;
if (length) {
char *string = (char *)malloc(length + 1);
strncpy(string, [cssString UTF8String] + matches[0].rm_so, length);
@@ -185,7 +185,7 @@ void ConvertHSLToRGB (const CGFloat *hslComponents, CGFloat *rgbComponents) {
if (subcode == 0) {
for (int i = 2; i < 6; i++) { // NOTE: the first two matches are the whole string
if (submatches[i].rm_so && submatches[i].rm_eo) {
- int sublength = submatches[i].rm_eo - submatches[i].rm_so;
+ int64_t sublength = submatches[i].rm_eo - submatches[i].rm_so;
char *substring = (char *)malloc(sublength + 1);
strncpy(substring, string + submatches[i].rm_so, sublength);
substring[sublength] = 0;
@@ -239,7 +239,7 @@ void ConvertHSLToRGB (const CGFloat *hslComponents, CGFloat *rgbComponents) {
if (subcode == 0) {
for (int i = 1; i < 5; i++) { // NOTE: the first two matches are the whole string
if (submatches[i].rm_so && submatches[i].rm_eo) {
- int sublength = submatches[i].rm_eo - submatches[i].rm_so;
+ int64_t sublength = submatches[i].rm_eo - submatches[i].rm_so;
char *substring = (char *)malloc(sublength + 1);
strncpy(substring, string + submatches[i].rm_so, sublength);
substring[sublength] = 0;
diff --git a/core/NSDictionary+V8.mm b/core/NSDictionary+V8.mm
index ba77550..029ed40 100644
--- a/core/NSDictionary+V8.mm
+++ b/core/NSDictionary+V8.mm
@@ -55,9 +55,9 @@ static Handle<Array> MapEnumerator(const AccessorInfo& info) {
NSDictionary *dict = (NSDictionary *)info.Holder()->GetPointerFromInternalField(0);
- int size = dict.count;
+ NSUInteger size = dict.count;
- Local<Array> env = Array::New(size);
+ Local<Array> env = Array::New((int)size);
int i = 0;
for (id value in dict) {
if ([value respondsToSelector:@selector(jsObj)]) {
diff --git a/core/NSString+V8.mm b/core/NSString+V8.mm
index e239992..4917744 100644
--- a/core/NSString+V8.mm
+++ b/core/NSString+V8.mm
@@ -17,7 +17,7 @@ using namespace v8;
- (v8::Handle<v8::String>)jsObj
{
HandleScope handle_scope;
- return handle_scope.Close(String::New([(NSString *)self UTF8String], [(NSString *)self length]));
+ return handle_scope.Close(String::New([(NSString *)self UTF8String], (int)[(NSString *)self length]));
}
@end
diff --git a/entities/JMXScriptEntity.mm b/entities/JMXScriptEntity.mm
index 3b892ef..4977daa 100644
--- a/entities/JMXScriptEntity.mm
+++ b/entities/JMXScriptEntity.mm
@@ -293,7 +293,7 @@ static Persistent<FunctionTemplate> objectTemplate;
static v8::Handle<Value>Exec(const Arguments& args)
{
//v8::Locker lock;
- BOOL ret;
+ BOOL ret = NO;
HandleScope handleScope;
JMXScriptEntity *entity = (JMXScriptEntity *)args.Holder()->GetPointerFromInternalField(0);
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
diff --git a/entities/video_filters/JMXCoreImageFilter.mm b/entities/video_filters/JMXCoreImageFilter.mm
index 59fe427..53f08af 100644
--- a/entities/video_filters/JMXCoreImageFilter.mm
+++ b/entities/video_filters/JMXCoreImageFilter.mm
@@ -112,13 +112,20 @@ JMXV8_EXPORT_NODE_CLASS(JMXCoreImageFilter);
{
for (JMXInputPin *pin in [self inputPins]) {
// TODO - extendable [JMXEntity defaultInputPins]
- if (pin.label != @"frame" && pin.label != @"filter" && pin.label != @"active")
+ if (![pin.label isEqualToString:@"frame"] &&
+ ![pin.label isEqualToString:@"filter"] &&
+ ![pin.label isEqualToString:@"active"])
+ {
[self unregisterInputPin:pin.label];
+ }
}
for (JMXOutputPin *pin in [self outputPins]) {
// TODO - extendable [JMXEntity defaultOutputPins]
- if (pin.label != @"frame" && pin.label != @"active")
+ if (![pin.label isEqualToString:@"frame"] &&
+ ![pin.label isEqualToString:@"active"])
+ {
[self unregisterOutputPin:pin.label];
+ }
}
}
@@ -145,7 +152,7 @@ JMXV8_EXPORT_NODE_CLASS(JMXCoreImageFilter);
if (![key isEqualTo:@"inputImage"]) {
NSDictionary *inputParam = [attributes objectForKey:key];
NSString *type = [inputParam objectForKey:@"CIAttributeClass"];
- JMXInputPin *inputPin;
+ JMXInputPin *inputPin = nil;
if ([type isEqualTo:@"NSNumber"]) {
inputPin = [self registerInputPin:key withType:kJMXNumberPin andSelector:@"setFilterValue:userData:" userData:key];
} else if ([type isEqualTo:@"CIVector"]) {
diff --git a/entities/video_outputs/JMXOpenGLScreen.mm b/entities/video_outputs/JMXOpenGLScreen.mm
index 985b7fd..2ef447d 100644
--- a/entities/video_outputs/JMXOpenGLScreen.mm
+++ b/entities/video_outputs/JMXOpenGLScreen.mm
@@ -329,7 +329,7 @@ static CVReturn renderCallback(CVDisplayLinkRef displayLink,
fullScreen = NO;
} else {
CGDisplayModeRef newMode;
- bool exactMatch;
+ BOOL exactMatch = NO;
CGDirectDisplayID currentDisplayID = (CGDirectDisplayID)[[[[[self window] screen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue];
//CGDirectDisplayID currentDisplayID = viewDisplayID;
// Loop through all display modes to determine the closest match.
@@ -347,7 +347,7 @@ static CVReturn renderCallback(CVDisplayLinkRef displayLink,
if((CGDisplayModeGetWidth(mode) >= frameSize.width) && (CGDisplayModeGetHeight(mode) >= frameSize.height))
{
newMode = mode;
- exactMatch = true;
+ exactMatch = YES;
break;
}
}
diff --git a/node.js/deps/cares/src/ares_process.c b/node.js/deps/cares/src/ares_process.c
index 79a999f..1f4f71c 100644
--- a/node.js/deps/cares/src/ares_process.c
+++ b/node.js/deps/cares/src/ares_process.c
@@ -478,7 +478,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
else
fromlen = sizeof(from.sa6);
count = (ssize_t)recvfrom(server->udp_socket, (void *)buf, sizeof(buf),
- 0, &from.sa, &fromlen);
+ 0, &from.sa, (socklen_t *)&fromlen);
#else
count = sread(server->udp_socket, buf, sizeof(buf));
#endif
diff --git a/node.js/src/node.cc b/node.js/src/node.cc
index 9b27bfd..7625a1c 100644
--- a/node.js/src/node.cc
+++ b/node.js/src/node.cc
@@ -2289,7 +2289,7 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) {
}
}
versions->Set(String::NewSymbol("openssl"),
- String::New(OPENSSL_VERSION_TEXT + i, j - i));
+ String::New(&OPENSSL_VERSION_TEXT[i], j - i));
#endif