From 06df69b960984c89362b0f3a73d03604868c6083 Mon Sep 17 00:00:00 2001 From: "valeski%netscape.com" Date: Fri, 29 Oct 1999 23:35:06 +0000 Subject: [PATCH] warning fixes, again :( --- netwerk/streamconv/converters/nsMultiMixedConv.cpp | 10 +++++----- netwerk/streamconv/src/nsStreamConverterService.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.cpp b/netwerk/streamconv/converters/nsMultiMixedConv.cpp index f488c18cb7c9..1f1d71b61215 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp +++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp @@ -26,6 +26,7 @@ #include "nsIGenericFactory.h" #include "nsCOMPtr.h" #include "nsIIOService.h" +#include "nsXPIDLString.h" static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID); static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); @@ -78,16 +79,16 @@ nsMultiMixedConv::OnDataAvailable(nsIChannel *channel, nsISupports *ctxt, NS_ASSERTION(channel, "multimixed converter needs a channel"); if (!mBoundaryCStr) { - char *bndry = nsnull, *delimiter = nsnull; + char *bndry = nsnull; + nsXPIDLCString delimiter; // ask the HTTP channel for the content-type and extract the boundary from it. nsCOMPtr httpChannel; rv = channel->QueryInterface(NS_GET_IID(nsIHTTPChannel), getter_AddRefs(httpChannel)); if (NS_SUCCEEDED(rv)) { - char *bndry = nsnull, *delimiter = nsnull; nsIAtom *header = NS_NewAtom("content-type"); if (!header) return NS_ERROR_OUT_OF_MEMORY; - rv = httpChannel->GetResponseHeader(header, &delimiter); + rv = httpChannel->GetResponseHeader(header, getter_Copies(delimiter)); NS_RELEASE(header); if (NS_FAILED(rv)) return rv; @@ -107,7 +108,7 @@ nsMultiMixedConv::OnDataAvailable(nsIChannel *channel, nsISupports *ctxt, mBoundaryStrLen = boundaryString.Length(); } else { // try asking the channel directly - rv = channel->GetContentType(&delimiter); + rv = channel->GetContentType(getter_Copies(delimiter)); if (NS_FAILED(rv)) return rv; if (!delimiter) return NS_ERROR_FAILURE; @@ -120,7 +121,6 @@ nsMultiMixedConv::OnDataAvailable(nsIChannel *channel, nsISupports *ctxt, bndry++; // move past the equals sign nsCString boundaryString(bndry); - nsAllocator::Free(delimiter); boundaryString.StripWhitespace(); mBoundaryCStr = boundaryString.ToNewCString(); if (!mBoundaryCStr) return NS_ERROR_OUT_OF_MEMORY; diff --git a/netwerk/streamconv/src/nsStreamConverterService.cpp b/netwerk/streamconv/src/nsStreamConverterService.cpp index dfcb2bfd23af..e8a06f66a505 100644 --- a/netwerk/streamconv/src/nsStreamConverterService.cpp +++ b/netwerk/streamconv/src/nsStreamConverterService.cpp @@ -658,7 +658,7 @@ nsStreamConverterService::AsyncConvertData(const PRUnichar *aFromType, return rv; } - nsCOMPtr listener(do_QueryInterface(converter, &rv)); + nsCOMPtr chainListener(do_QueryInterface(converter, &rv)); if (NS_FAILED(rv)) { delete converterChain; return rv; @@ -666,9 +666,9 @@ nsStreamConverterService::AsyncConvertData(const PRUnichar *aFromType, // store the listener of the first converter in the chain. if (!fromListener) - fromListener = listener; + fromListener = chainListener; - forwardListener = listener; + forwardListener = chainListener; } delete converterChain; // return the first listener in the chain.