Title: [174389] trunk/Source/WebCore
- Revision
- 174389
- Author
- aes...@apple.com
- Date
- 2014-10-07 00:06:27 -0700 (Tue, 07 Oct 2014)
Log Message
Fix a warning when passing an NSInteger to abs().
https://bugs.webkit.org/show_bug.cgi?id=137480
Reviewed by Mark Rowe.
Use std::abs() instead, which is overloaded for both long (a.k.a. NSInteger) and int.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (174388 => 174389)
--- trunk/Source/WebCore/ChangeLog 2014-10-07 06:58:41 UTC (rev 174388)
+++ trunk/Source/WebCore/ChangeLog 2014-10-07 07:06:27 UTC (rev 174389)
@@ -1,3 +1,16 @@
+2014-10-07 Andy Estes <aes...@apple.com>
+
+ Fix a warning when passing an NSInteger to abs().
+ https://bugs.webkit.org/show_bug.cgi?id=137480
+
+ Reviewed by Mark Rowe.
+
+ Use std::abs() instead, which is overloaded for both long (a.k.a. NSInteger) and int.
+
+ * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
+ (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
+ (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
+
2014-10-06 Darin Adler <da...@apple.com>
Make StringView check the lifetime of the StringImpl it's created from
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm (174388 => 174389)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2014-10-07 06:58:41 UTC (rev 174388)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2014-10-07 07:06:27 UTC (rev 174389)
@@ -37,6 +37,7 @@
#import "SoftLinking.h"
#import "UUID.h"
#import <CoreMedia/CMBase.h>
+#import <cstdlib>
#import <objc/objc-runtime.h>
#import <wtf/NeverDestroyed.h>
#import <runtime/TypedArrayInlines.h>
@@ -216,7 +217,7 @@
if (!m_client)
return;
- m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, abs([error code]));
+ m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, std::abs([error code]));
}
void CDMSessionMediaSourceAVFObjC::rendererDidReceiveError(AVSampleBufferAudioRenderer *, NSError *error)
@@ -224,7 +225,7 @@
if (!m_client)
return;
- m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, abs([error code]));
+ m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, std::abs([error code]));
}
void CDMSessionMediaSourceAVFObjC::addSourceBuffer(SourceBufferPrivateAVFObjC* sourceBuffer)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes