bug 1118552 - fix gcc4.9 warnings on Android r=glandium
authorJames Willcox <snorp@snorp.net>
Tue, 06 Jan 2015 22:20:46 -0500
changeset 223089 3cb89f063d086ae784631c5958b45c56fb798192
parent 223088 e672c279ff312b2f42897ac0cef9701247c5ef8a
child 223090 0af503927b54c9a75db5a9192e3a5a5719bf437a
push id28082
push usercbook@mozilla.com
push dateMon, 12 Jan 2015 10:44:52 +0000
treeherdermozilla-central@643589c3ef94 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1118552
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1118552 - fix gcc4.9 warnings on Android r=glandium
dom/network/UDPSocketParent.cpp
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
mozglue/build/arm.cpp
xpcom/base/nsMemoryReporterManager.cpp
--- a/dom/network/UDPSocketParent.cpp
+++ b/dom/network/UDPSocketParent.cpp
@@ -82,17 +82,17 @@ UDPSocketParent::Init(const nsACString& 
     nsAutoCString contractId(NS_NETWORK_UDP_SOCKET_FILTER_HANDLER_PREFIX);
     contractId.Append(aFilter);
     nsCOMPtr<nsIUDPSocketFilterHandler> filterHandler =
       do_GetService(contractId.get());
     if (filterHandler) {
       nsresult rv = filterHandler->NewFilter(getter_AddRefs(mFilter));
       if (NS_FAILED(rv)) {
         printf_stderr("Cannot create filter that content specified. "
-                      "filter name: %s, error code: %d.", aFilter.BeginReading(), rv);
+                      "filter name: %s, error code: %u.", aFilter.BeginReading(),  static_cast<uint32_t>(rv));
         return false;
       }
     } else {
       printf_stderr("Content doesn't have a valid filter. "
                     "filter name: %s.", aFilter.BeginReading());
       return false;
     }
   }
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -196,24 +196,24 @@ public:
     // on this callback
 
     nsTArray<nsRefPtr<MediaStreamTrack>> tracks;
     aStream->GetTracks(tracks);
     for (uint32_t i = 0; i < tracks.Length(); i++) {
       JSErrorResult rv;
       mObserver->OnAddTrack(*tracks[i], rv);
       if (rv.Failed()) {
-        CSFLogError(logTag, ": OnAddTrack(%d) failed! Error: %d", i,
-                    rv.ErrorCode());
+        CSFLogError(logTag, ": OnAddTrack(%d) failed! Error: %u", i,
+                    static_cast<uint32_t>(rv.ErrorCode()));
       }
     }
     JSErrorResult rv;
     mObserver->OnAddStream(*aStream, rv);
     if (rv.Failed()) {
-      CSFLogError(logTag, ": OnAddStream() failed! Error: %d", rv.ErrorCode());
+      CSFLogError(logTag, ": OnAddStream() failed! Error: %u", static_cast<uint32_t>(rv.ErrorCode()));
     }
   }
 private:
   nsRefPtr<PeerConnectionObserver> mObserver;
 };
 #endif
 
 #ifdef MOZILLA_INTERNAL_API
--- a/mozglue/build/arm.cpp
+++ b/mozglue/build/arm.cpp
@@ -4,17 +4,16 @@
 
 /* compile-time and runtime tests for whether to use various ARM extensions */
 
 #include "mozilla/NullPtr.h"
 
 #include "arm.h"
 
 #if defined(MOZILLA_ARM_HAVE_CPUID_DETECTION)
-namespace {
 
 // arm.h has parallel #ifs which declare MOZILLA_ARM_HAVE_CPUID_DETECTION.
 // We don't check it here so that we get compile errors if it's defined, but
 // we don't compile one of these detection methods. The detection code here is
 // based on the CPU detection in libtheora.
 
 #  if defined(_MSC_VER)
 //For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.
@@ -214,18 +213,16 @@ static bool
 check_neon(void)
 {
   return (arm_cpu_flags & MOZILLA_HAS_NEON_FLAG) != 0;
 }
 #    endif
 
 #  endif // defined(__linux__) || defined(ANDROID)
 
-}
-
 namespace mozilla {
   namespace arm_private {
 #  if !defined(MOZILLA_PRESUME_EDSP)
     bool edsp_enabled = check_edsp();
 #  endif
 #  if !defined(MOZILLA_PRESUME_ARMV6)
     bool armv6_enabled = check_armv6();
 #  endif
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -979,17 +979,17 @@ NS_IMPL_ISUPPORTS(DMDReporter, nsIMemory
  ** nsMemoryReporterManager implementation
  **/
 
 NS_IMPL_ISUPPORTS(nsMemoryReporterManager, nsIMemoryReporterManager)
 
 NS_IMETHODIMP
 nsMemoryReporterManager::Init()
 {
-#if defined(HAVE_JEMALLOC_STATS) && defined(XP_LINUX)
+#if defined(HAVE_JEMALLOC_STATS) && defined(MOZ_GLUE_IN_PROGRAM)
   if (!jemalloc_stats) {
     return NS_ERROR_FAILURE;
   }
 #endif
 
 #ifdef HAVE_JEMALLOC_STATS
   RegisterStrongReporter(new JemallocHeapReporter());
 #endif