mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 745296 - Enable FAIL_ON_WARNINGS in more of /netwerk r=jduell
This commit is contained in:
parent
9261de29e6
commit
79b6b7fa0b
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -8,6 +8,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -600,7 +600,7 @@ nsPartialFileInputStream::Init(nsIFile* aFile, uint64_t aStart,
|
||||
NS_IMETHODIMP
|
||||
nsPartialFileInputStream::Tell(int64_t *aResult)
|
||||
{
|
||||
int64_t tell;
|
||||
int64_t tell = 0;
|
||||
nsresult rv = nsFileInputStream::Tell(&tell);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*aResult = tell - mStart;
|
||||
@ -611,7 +611,7 @@ nsPartialFileInputStream::Tell(int64_t *aResult)
|
||||
NS_IMETHODIMP
|
||||
nsPartialFileInputStream::Available(uint64_t* aResult)
|
||||
{
|
||||
uint64_t available;
|
||||
uint64_t available = 0;
|
||||
nsresult rv = nsFileInputStream::Available(&available);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*aResult = TruncateSize(available);
|
||||
@ -980,4 +980,4 @@ nsFileStream::GetLastModified(int64_t* _retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -179,6 +179,7 @@ class nsPartialFileInputStream : public nsFileInputStream,
|
||||
{
|
||||
public:
|
||||
using nsFileInputStream::Init;
|
||||
using nsFileInputStream::Read;
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIPARTIALFILEINPUTSTREAM
|
||||
NS_DECL_NSIIPCSERIALIZABLEINPUTSTREAM
|
||||
|
@ -471,7 +471,9 @@ nsAuthURLParser::ParseAuthority(const char *auth, int32_t authLen,
|
||||
|
||||
// search backwards for @
|
||||
const char *p = auth + authLen - 1;
|
||||
for (; (*p != '@') && (p > auth); --p);
|
||||
for (; (*p != '@') && (p > auth); --p) {
|
||||
continue;
|
||||
}
|
||||
if ( *p == '@' ) {
|
||||
// auth = <user-info@server-info>
|
||||
rv = ParseUserInfo(auth, p - auth,
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
3
netwerk/cache/nsCacheService.cpp
vendored
3
netwerk/cache/nsCacheService.cpp
vendored
@ -2522,10 +2522,9 @@ nsCacheService::CloseDescriptor(nsCacheEntryDescriptor * descriptor)
|
||||
// ask entry to remove descriptor
|
||||
nsCacheEntry * entry = descriptor->CacheEntry();
|
||||
bool stillActive = entry->RemoveDescriptor(descriptor);
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (!entry->IsValid()) {
|
||||
rv = gService->ProcessPendingRequests(entry);
|
||||
gService->ProcessPendingRequests(entry);
|
||||
}
|
||||
|
||||
if (!stillActive) {
|
||||
|
24
netwerk/cache/nsDiskCacheBinding.cpp
vendored
24
netwerk/cache/nsDiskCacheBinding.cpp
vendored
@ -202,9 +202,12 @@ nsDiskCacheBindery::FindActiveBinding(uint32_t hashNumber)
|
||||
NS_ASSERTION(initialized, "nsDiskCacheBindery not initialized");
|
||||
// find hash entry for key
|
||||
HashTableEntry * hashEntry;
|
||||
hashEntry = (HashTableEntry *) PL_DHashTableOperate(&table, (void*) hashNumber, PL_DHASH_LOOKUP);
|
||||
hashEntry =
|
||||
(HashTableEntry *) PL_DHashTableOperate(&table,
|
||||
(void*)(uintptr_t) hashNumber,
|
||||
PL_DHASH_LOOKUP);
|
||||
if (PL_DHASH_ENTRY_IS_FREE(hashEntry)) return nullptr;
|
||||
|
||||
|
||||
// walk list looking for active entry
|
||||
NS_ASSERTION(hashEntry->mBinding, "hash entry left with no binding");
|
||||
nsDiskCacheBinding * binding = hashEntry->mBinding;
|
||||
@ -234,9 +237,10 @@ nsDiskCacheBindery::AddBinding(nsDiskCacheBinding * binding)
|
||||
|
||||
// find hash entry for key
|
||||
HashTableEntry * hashEntry;
|
||||
hashEntry = (HashTableEntry *) PL_DHashTableOperate(&table,
|
||||
(void*) binding->mRecord.HashNumber(),
|
||||
PL_DHASH_ADD);
|
||||
hashEntry = (HashTableEntry *)
|
||||
PL_DHashTableOperate(&table,
|
||||
(void *)(uintptr_t) binding->mRecord.HashNumber(),
|
||||
PL_DHASH_ADD);
|
||||
if (!hashEntry) return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (hashEntry->mBinding == nullptr) {
|
||||
@ -296,10 +300,10 @@ nsDiskCacheBindery::RemoveBinding(nsDiskCacheBinding * binding)
|
||||
if (!initialized) return;
|
||||
|
||||
HashTableEntry * hashEntry;
|
||||
void * key = (void *)binding->mRecord.HashNumber();
|
||||
void * key = (void *)(uintptr_t)binding->mRecord.HashNumber();
|
||||
|
||||
hashEntry = (HashTableEntry*) PL_DHashTableOperate(&table,
|
||||
(void*) key,
|
||||
(void*)(uintptr_t) key,
|
||||
PL_DHASH_LOOKUP);
|
||||
if (!PL_DHASH_ENTRY_IS_BUSY(hashEntry)) {
|
||||
NS_WARNING("### disk cache: binding not in hashtable!");
|
||||
@ -309,9 +313,9 @@ nsDiskCacheBindery::RemoveBinding(nsDiskCacheBinding * binding)
|
||||
if (binding == hashEntry->mBinding) {
|
||||
if (PR_CLIST_IS_EMPTY(binding)) {
|
||||
// remove this hash entry
|
||||
(void) PL_DHashTableOperate(&table,
|
||||
(void*) binding->mRecord.HashNumber(),
|
||||
PL_DHASH_REMOVE);
|
||||
PL_DHashTableOperate(&table,
|
||||
(void*)(uintptr_t) binding->mRecord.HashNumber(),
|
||||
PL_DHASH_REMOVE);
|
||||
return;
|
||||
|
||||
} else {
|
||||
|
3
netwerk/cache/nsDiskCacheStreams.cpp
vendored
3
netwerk/cache/nsDiskCacheStreams.cpp
vendored
@ -135,11 +135,10 @@ nsDiskCacheInputStream::Read(char * buffer, uint32_t count, uint32_t * bytesRead
|
||||
// just read from file
|
||||
int32_t result = PR_Read(mFD, buffer, count);
|
||||
if (result < 0) {
|
||||
PRErrorCode error = PR_GetError();
|
||||
nsresult rv = NS_ErrorAccordingToNSPR();
|
||||
CACHE_LOG_DEBUG(("CACHE: nsDiskCacheInputStream::Read PR_Read failed"
|
||||
"[stream=%p, rv=%d, NSPR error %s",
|
||||
this, int(rv), PR_ErrorToName(error)));
|
||||
this, int(rv), PR_ErrorToName(PR_GetError())));
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = @relativesrcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -2829,7 +2829,8 @@ nsCookieService::GetTokenValue(nsASingleFragmentCString::const_char_iterator &aI
|
||||
// remove trailing <LWS>; first check we're not at the beginning
|
||||
lastSpace = aIter;
|
||||
if (lastSpace != start) {
|
||||
while (--lastSpace != start && iswhitespace(*lastSpace));
|
||||
while (--lastSpace != start && iswhitespace(*lastSpace))
|
||||
continue;
|
||||
++lastSpace;
|
||||
}
|
||||
aTokenString.Rebind(start, lastSpace);
|
||||
@ -2837,7 +2838,8 @@ nsCookieService::GetTokenValue(nsASingleFragmentCString::const_char_iterator &aI
|
||||
aEqualsFound = (*aIter == '=');
|
||||
if (aEqualsFound) {
|
||||
// find <value>
|
||||
while (++aIter != aEndIter && iswhitespace(*aIter));
|
||||
while (++aIter != aEndIter && iswhitespace(*aIter))
|
||||
continue;
|
||||
|
||||
start = aIter;
|
||||
|
||||
@ -2849,7 +2851,8 @@ nsCookieService::GetTokenValue(nsASingleFragmentCString::const_char_iterator &aI
|
||||
// remove trailing <LWS>; first check we're not at the beginning
|
||||
if (aIter != start) {
|
||||
lastSpace = aIter;
|
||||
while (--lastSpace != start && iswhitespace(*lastSpace));
|
||||
while (--lastSpace != start && iswhitespace(*lastSpace))
|
||||
continue;
|
||||
aTokenValue.Rebind(start, ++lastSpace);
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -6,6 +6,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -793,7 +793,7 @@ nsMIMEHeaderParamImpl::DecodeRFC5987Param(const nsACString& aParamVal,
|
||||
if (tc == '\'') {
|
||||
// single quote
|
||||
delimiters++;
|
||||
} else if (tc >= 128) {
|
||||
} else if (((unsigned char)tc) >= 128) {
|
||||
// fail early, not ASCII
|
||||
NS_WARNING("non-US-ASCII character in RFC5987-encoded param");
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -15,19 +15,18 @@ NS_IMETHODIMP
|
||||
nsAboutBlank::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
nsresult rv;
|
||||
nsIChannel* channel;
|
||||
|
||||
nsCOMPtr<nsIInputStream> in;
|
||||
rv = NS_NewCStringInputStream(getter_AddRefs(in), EmptyCString());
|
||||
nsresult rv = NS_NewCStringInputStream(getter_AddRefs(in), EmptyCString());
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = NS_NewInputStreamChannel(&channel, aURI, in,
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = NS_NewInputStreamChannel(getter_AddRefs(channel), aURI, in,
|
||||
NS_LITERAL_CSTRING("text/html"),
|
||||
NS_LITERAL_CSTRING("utf-8"));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
*result = channel;
|
||||
channel.forget(result);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -106,13 +106,13 @@ nsAboutCache::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
rv = storageStream->NewInputStream(0, getter_AddRefs(inStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsIChannel* channel;
|
||||
rv = NS_NewInputStreamChannel(&channel, aURI, inStr,
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = NS_NewInputStreamChannel(getter_AddRefs(channel), aURI, inStr,
|
||||
NS_LITERAL_CSTRING("text/html"),
|
||||
NS_LITERAL_CSTRING("utf-8"));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
*result = channel;
|
||||
channel.forget(result);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -391,7 +391,8 @@ nsresult
|
||||
nsHttpConnectionMgr::UpdateParam(nsParamName name, uint16_t value)
|
||||
{
|
||||
uint32_t param = (uint32_t(name) << 16) | uint32_t(value);
|
||||
return PostEvent(&nsHttpConnectionMgr::OnMsgUpdateParam, 0, (void *) param);
|
||||
return PostEvent(&nsHttpConnectionMgr::OnMsgUpdateParam, 0,
|
||||
(void *)(uintptr_t) param);
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -953,7 +954,7 @@ nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent)
|
||||
if (dispatchedSuccessfully)
|
||||
return true;
|
||||
|
||||
NS_ABORT_IF_FALSE(count == ((int32_t) ent->mPendingQ.Length()),
|
||||
NS_ABORT_IF_FALSE(count == ent->mPendingQ.Length(),
|
||||
"something mutated pending queue from "
|
||||
"GetConnection()");
|
||||
}
|
||||
|
@ -48,9 +48,8 @@ nsresult
|
||||
nsHttpHeaderArray::SetHeaderFromNet(nsHttpAtom header, const nsACString &value)
|
||||
{
|
||||
nsEntry *entry = nullptr;
|
||||
int32_t index;
|
||||
|
||||
index = LookupEntry(header, &entry);
|
||||
LookupEntry(header, &entry);
|
||||
|
||||
if (!entry) {
|
||||
if (value.IsEmpty()) {
|
||||
|
@ -73,7 +73,6 @@ private:
|
||||
|
||||
// used when calling ReadSegments/WriteSegments on a transaction.
|
||||
nsAHttpSegmentReader *mReader;
|
||||
nsAHttpSegmentWriter *mWriter;
|
||||
|
||||
// send buffer
|
||||
nsCOMPtr<nsIInputStream> mSendBufIn;
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* vim:set expandtab ts=4 sw=4 sts=4 cin: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
@ -934,7 +934,7 @@ nsSOCKSSocketInfo::ReadUint32()
|
||||
void
|
||||
nsSOCKSSocketInfo::ReadNetAddr(PRNetAddr *addr, uint16_t fam)
|
||||
{
|
||||
uint32_t amt;
|
||||
uint32_t amt = 0;
|
||||
const uint8_t *ip = mData + mReadOffset;
|
||||
|
||||
addr->raw.family = fam;
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -31,11 +31,6 @@ int ParseFTPList(const char *line, struct list_state *state,
|
||||
return 0;
|
||||
|
||||
memset( result, 0, sizeof(*result) );
|
||||
if (state->magic != ((void *)ParseFTPList))
|
||||
{
|
||||
memset( state, 0, sizeof(*state) );
|
||||
state->magic = ((void *)ParseFTPList);
|
||||
}
|
||||
state->numlines++;
|
||||
|
||||
/* carry buffer is only valid from one line to the next */
|
||||
|
@ -65,7 +65,10 @@
|
||||
|
||||
struct list_state
|
||||
{
|
||||
void *magic; /* to determine if previously initialized */
|
||||
list_state() {
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
PRTime now_time; /* needed for year determination */
|
||||
PRExplodedTime now_tm; /* needed for year determination */
|
||||
int32_t lstyle; /* LISTing style */
|
||||
|
@ -252,7 +252,6 @@ nsFTPDirListingConv::DigestBufferLines(char *aBuffer, nsCString &aString) {
|
||||
bool cr = false;
|
||||
|
||||
list_state state;
|
||||
state.magic = 0;
|
||||
|
||||
// while we have new lines, parse 'em into application/http-index-format.
|
||||
while ( line && (eol = PL_strchr(line, nsCRT::LF)) ) {
|
||||
|
@ -316,8 +316,8 @@ void nsUnknownDecoder::DetermineContentType(nsIRequest* aRequest)
|
||||
NS_ASSERTION(sSnifferEntries[i].mMimeType ||
|
||||
sSnifferEntries[i].mContentTypeSniffer,
|
||||
"Must have either a type string or a function to set the type");
|
||||
NS_ASSERTION(sSnifferEntries[i].mMimeType == nullptr ||
|
||||
sSnifferEntries[i].mContentTypeSniffer == nullptr,
|
||||
NS_ASSERTION(!sSnifferEntries[i].mMimeType ||
|
||||
!sSnifferEntries[i].mContentTypeSniffer,
|
||||
"Both a type string and a type sniffing function set;"
|
||||
" using type string");
|
||||
if (sSnifferEntries[i].mMimeType) {
|
||||
@ -549,7 +549,9 @@ bool nsUnknownDecoder::LastDitchSniff(nsIRequest* aRequest)
|
||||
// just call it text/plain...
|
||||
//
|
||||
uint32_t i;
|
||||
for (i=0; i<mBufferLen && IS_TEXT_CHAR(mBuffer[i]); i++);
|
||||
for (i = 0; i < mBufferLen && IS_TEXT_CHAR(mBuffer[i]); i++) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i == mBufferLen) {
|
||||
mContentType = TEXT_PLAIN;
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -14,6 +14,12 @@ MODULE = necko
|
||||
LIBRARY_NAME = nkconv_s
|
||||
LIBXUL_LIBRARY = 1
|
||||
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
ifeq (x86_64,$(OS_TEST))
|
||||
# nsAppleFileDecoder.cpp has warnings I don't understand.
|
||||
FAIL_ON_WARNINGS := 1
|
||||
endif
|
||||
endif
|
||||
|
||||
CPPSRCS = \
|
||||
nsStreamConverterService.cpp \
|
||||
|
@ -7,13 +7,13 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = TestStreamConv
|
||||
PROGRAM = TestStreamConv$(BIN_SUFFIX)
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
Converters.cpp \
|
||||
TestStreamConv.cpp \
|
||||
|
@ -6,13 +6,13 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = necko
|
||||
LIBRARY_NAME = neckosystem_s
|
||||
LIBXUL_LIBRARY = 1
|
||||
FAIL_ON_WARNINGS = 1
|
||||
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -6,6 +6,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -7,6 +7,7 @@ DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -9,6 +9,7 @@ topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = @relativesrcdir@
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* vim: set ts=4 sw=4 et cindent: */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 sw=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@ -378,8 +378,9 @@ InputTestConsumer::OnStartRequest(nsIRequest *request, nsISupports* context)
|
||||
if (info)
|
||||
info->mConnectTime = PR_Now() - info->mConnectTime;
|
||||
|
||||
if (gVerbose)
|
||||
if (gVerbose) {
|
||||
LOG(("\nStarted loading: %s\n", info ? info->Name() : "UNKNOWN URL"));
|
||||
}
|
||||
|
||||
nsCAutoString value;
|
||||
|
||||
@ -401,10 +402,11 @@ InputTestConsumer::OnStartRequest(nsIRequest *request, nsISupports* context)
|
||||
LOG(("\tContent-Charset: %s\n", value.get()));
|
||||
|
||||
int32_t length = -1;
|
||||
if (NS_SUCCEEDED(channel->GetContentLength(&length)))
|
||||
if (NS_SUCCEEDED(channel->GetContentLength(&length))) {
|
||||
LOG(("\tContent-Length: %d\n", length));
|
||||
else
|
||||
} else {
|
||||
LOG(("\tContent-Length: Unknown\n"));
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISupports> owner;
|
||||
@ -430,16 +432,18 @@ InputTestConsumer::OnStartRequest(nsIRequest *request, nsISupports* context)
|
||||
int64_t len;
|
||||
nsresult rv = propbag->GetPropertyAsInt64(NS_CHANNEL_PROP_CONTENT_LENGTH,
|
||||
&len);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
LOG(("\t64-bit length: %lli\n", len));
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIHttpChannelInternal> httpChannelInt(do_QueryInterface(request));
|
||||
if (httpChannelInt) {
|
||||
uint32_t majorVer, minorVer;
|
||||
nsresult rv = httpChannelInt->GetResponseVersion(&majorVer, &minorVer);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
LOG(("HTTP Response version: %u.%u\n", majorVer, minorVer));
|
||||
}
|
||||
}
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(request));
|
||||
if (httpChannel) {
|
||||
@ -533,12 +537,13 @@ InputTestConsumer::OnStopRequest(nsIRequest *request, nsISupports* context,
|
||||
}
|
||||
|
||||
LOG(("\nFinished loading: %s Status Code: %x\n", info->Name(), aStatus));
|
||||
if (bHTTPURL)
|
||||
LOG(("\tHTTP Status: %u\n", httpStatus));
|
||||
if (NS_ERROR_UNKNOWN_HOST == aStatus ||
|
||||
NS_ERROR_UNKNOWN_PROXY_HOST == aStatus) {
|
||||
LOG(("\tDNS lookup failed.\n"));
|
||||
}
|
||||
if (bHTTPURL) {
|
||||
LOG(("\tHTTP Status: %u\n", httpStatus));
|
||||
}
|
||||
if (NS_ERROR_UNKNOWN_HOST == aStatus ||
|
||||
NS_ERROR_UNKNOWN_PROXY_HOST == aStatus) {
|
||||
LOG(("\tDNS lookup failed.\n"));
|
||||
}
|
||||
LOG(("\tTime to connect: %.3f seconds\n", connectTime));
|
||||
LOG(("\tTime to read: %.3f seconds.\n", readTime));
|
||||
LOG(("\tRead: %lld bytes.\n", info->mBytesRead));
|
||||
@ -646,8 +651,9 @@ nsresult StartLoadingURL(const char* aUrlString)
|
||||
if (props) {
|
||||
rv = props->SetPropertyAsInterface(NS_LITERAL_STRING("test.foo"),
|
||||
pURL);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
LOG(("set prop 'test.foo'\n"));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -17,6 +17,11 @@ GRE_MODULE = 1
|
||||
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
ifneq ($(OS_ARCH),Darwin)
|
||||
# osx_corewlan.mm has warnings I don't understand.
|
||||
FAIL_ON_WARNINGS := 1
|
||||
endif
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIWifiAccessPoint.idl \
|
||||
nsIWifiListener.idl \
|
||||
|
@ -33,7 +33,7 @@ typedef int (*iw_stats_t)(int skfd,
|
||||
static int scan_wifi(int skfd, char* ifname, char* args[], int count)
|
||||
{
|
||||
nsCOMArray<nsWifiAccessPoint>* accessPoints = (nsCOMArray<nsWifiAccessPoint>*) args[0];
|
||||
iw_stats_t iw_stats = (iw_stats_t) args[1];
|
||||
iw_stats_t iw_stats = (iw_stats_t) (uintptr_t) args[1];
|
||||
|
||||
struct iwreq wrq;
|
||||
|
||||
@ -109,15 +109,15 @@ nsWifiMonitor::DoScan()
|
||||
|
||||
static iw_open_t iw_open = NULL;
|
||||
if (!iw_open)
|
||||
iw_open = (iw_open_t) dlsym(iwlib_handle, "iw_sockets_open");
|
||||
iw_open = (iw_open_t) (uintptr_t) dlsym(iwlib_handle, "iw_sockets_open");
|
||||
|
||||
static iw_enum_t iw_enum = NULL;
|
||||
if (!iw_enum)
|
||||
iw_enum = (iw_enum_t) dlsym(iwlib_handle, "iw_enum_devices");
|
||||
iw_enum = (iw_enum_t) (uintptr_t) dlsym(iwlib_handle, "iw_enum_devices");
|
||||
|
||||
static iw_stats_t iw_stats = NULL;
|
||||
if (!iw_stats)
|
||||
iw_stats = (iw_stats_t)dlsym(iwlib_handle, "iw_get_stats");
|
||||
iw_stats = (iw_stats_t) (uintptr_t) dlsym(iwlib_handle, "iw_get_stats");
|
||||
|
||||
if (!iw_open || !iw_enum || !iw_stats) {
|
||||
LOG(("Could not load a symbol from iwlib.so\n"));
|
||||
@ -140,7 +140,7 @@ nsWifiMonitor::DoScan()
|
||||
nsCOMArray<nsWifiAccessPoint> lastAccessPoints;
|
||||
nsCOMArray<nsWifiAccessPoint> accessPoints;
|
||||
|
||||
char* args[] = {(char*) &accessPoints, (char*) iw_stats, nullptr };
|
||||
char* args[] = {(char*) &accessPoints, (char*) (uintptr_t) iw_stats, nullptr };
|
||||
|
||||
while (mKeepGoing) {
|
||||
accessPoints.Clear();
|
||||
|
Loading…
Reference in New Issue
Block a user