mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1073081 - Fix -Wsign-compare and -Wsign-conversion warnings. r=ehsan
--HG-- extra : source : 88c58a8cc276a4691ed23fd8b8f2f6c0713b50fd
This commit is contained in:
parent
2c60ae66cf
commit
40dadf0d08
@ -862,7 +862,7 @@ static int
|
||||
FindProperty(const InfallibleTArray<BluetoothNamedValue>& aProperties,
|
||||
const char* aPropertyType)
|
||||
{
|
||||
for (int i = 0; i < aProperties.Length(); ++i) {
|
||||
for (size_t i = 0; i < aProperties.Length(); ++i) {
|
||||
if (aProperties[i].name().EqualsASCII(aPropertyType)) {
|
||||
return i;
|
||||
}
|
||||
@ -4086,7 +4086,7 @@ BluetoothDBusService::SendMetaData(const nsAString& aTitle,
|
||||
a2dp->GetTitle(prevTitle);
|
||||
a2dp->GetAlbum(prevAlbum);
|
||||
|
||||
if (aMediaNumber != a2dp->GetMediaNumber() ||
|
||||
if (aMediaNumber < 0 || (uint64_t)aMediaNumber != a2dp->GetMediaNumber() ||
|
||||
!aTitle.Equals(prevTitle) ||
|
||||
!aAlbum.Equals(prevAlbum)) {
|
||||
UpdateNotification(ControlEventId::EVENT_TRACK_CHANGED, aMediaNumber);
|
||||
|
@ -917,7 +917,7 @@ void NetworkUtils::setInterfaceDns(CommandChain* aChain,
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((ret + written) >= sizeof(command)) {
|
||||
if (((size_t)ret + written) >= sizeof(command)) {
|
||||
command[written] = '\0';
|
||||
break;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ using namespace android;
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
uint32_t GrallocImage::sColorIdMap[] = {
|
||||
int32_t GrallocImage::sColorIdMap[] = {
|
||||
HAL_PIXEL_FORMAT_YCbCr_420_P, OMX_COLOR_FormatYUV420Planar,
|
||||
HAL_PIXEL_FORMAT_YCbCr_422_P, OMX_COLOR_FormatYUV422Planar,
|
||||
HAL_PIXEL_FORMAT_YCbCr_420_SP, OMX_COLOR_FormatYUV420SemiPlanar,
|
||||
|
@ -47,7 +47,7 @@ class GrallocImage : public PlanarYCbCrImage
|
||||
, public ISharedImage
|
||||
{
|
||||
typedef PlanarYCbCrData Data;
|
||||
static uint32_t sColorIdMap[];
|
||||
static int32_t sColorIdMap[];
|
||||
public:
|
||||
struct GrallocData {
|
||||
nsRefPtr<TextureClient> mGraphicBuffer;
|
||||
|
@ -608,7 +608,7 @@ readRDSDataThread(void* data)
|
||||
|
||||
// Skip the group if we skipped a block.
|
||||
// This stops us from processing blocks sent out of order.
|
||||
if (block_bitmap != ((1 << blocknum) - 1)) {
|
||||
if (block_bitmap != ((1u << blocknum) - 1u)) {
|
||||
block_bitmap |= 1 << V4L2_RDS_BLOCK_INVALID;
|
||||
continue;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ static void ProcLoaderClientDeinit();
|
||||
* starting from kBeginReserveFileDescriptor so that operations like
|
||||
* __android_log_print() won't take these magic FDs.
|
||||
*/
|
||||
static const int kReservedFileDescriptors = 5;
|
||||
static const size_t kReservedFileDescriptors = 5;
|
||||
static const int kBeginReserveFileDescriptor = STDERR_FILENO + 1;
|
||||
|
||||
class ProcLoaderParent : public PProcLoaderParent
|
||||
|
@ -309,7 +309,7 @@ UnixSocketConsumerIO::OnAccepted(int aFd,
|
||||
MOZ_ASSERT(MessageLoopForIO::current() == GetIOLoop());
|
||||
MOZ_ASSERT(GetConnectionStatus() == SOCKET_IS_LISTENING);
|
||||
MOZ_ASSERT(aAddr);
|
||||
MOZ_ASSERT(aAddrLen <= sizeof(mAddr));
|
||||
MOZ_ASSERT(aAddrLen > 0 && (size_t)aAddrLen <= sizeof(mAddr));
|
||||
|
||||
memcpy (&mAddr, aAddr, aAddrLen);
|
||||
mAddrSize = aAddrLen;
|
||||
|
@ -712,7 +712,7 @@ nsHttpHandler::InitUserAgentComponents()
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
bool valid = true;
|
||||
deviceId.Trim(" ", true, true);
|
||||
for (int i = 0; i < deviceId.Length(); i++) {
|
||||
for (size_t i = 0; i < deviceId.Length(); i++) {
|
||||
char c = deviceId.CharAt(i);
|
||||
if (!(isalnum(c) || c == '-' || c == '.')) {
|
||||
valid = false;
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
virtual int GetPrevFBAcquireFd() = 0;
|
||||
|
||||
float xdpi;
|
||||
uint32_t surfaceformat;
|
||||
int32_t surfaceformat;
|
||||
};
|
||||
|
||||
MOZ_EXPORT __attribute__ ((weak))
|
||||
|
Loading…
Reference in New Issue
Block a user