r=mkaply
Fix build errors with GCC 3.3.5 and some warnings
This commit is contained in:
mkaply%us.ibm.com 2005-01-28 15:50:34 +00:00
Родитель 2e814dfd8a
Коммит c41847a0fc
3 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -108,11 +108,11 @@ static void FixUpOutputString(char * aString)
{
// replace angle brackets with rect brackets
char * p = aString;
while(p = strstr(p, "<"))
while((p = strstr(p, "<")))
*p = '[';
p = aString;
while(p = strstr(p, ">"))
while((p = strstr(p, ">")))
*p = ']';
}
@ -191,7 +191,7 @@ BOOL CLogger::appendToLog(NPAPI_Action action, DWORD dwTickEnter, DWORD dwTickRe
}
}
int iLength = formatLogItem(plis, szOutput, m_szItemSeparator, TRUE);
formatLogItem(plis, szOutput, m_szItemSeparator, TRUE);
m_pLogFile->write(szOutput);
m_pLogFile->flush();
}
@ -288,7 +288,7 @@ void CLogger::clearTarget()
NPN_DestroyStream(m_pPluginInstance, m_pStream, NPRES_DONE);
NPN_NewStream(m_pPluginInstance, m_szStreamType, m_szTarget, &m_pStream);
NPN_Write(m_pPluginInstance, m_pStream, 1, "\n");
NPN_Write(m_pPluginInstance, m_pStream, 1, (void *)"\n");
if(!m_bShowImmediately)
{
@ -314,7 +314,7 @@ void CLogger::dumpLogToTarget()
{
for(LogItemListElement * plile = m_pLog->m_pFirst; plile != NULL; plile = plile->pNext)
{
int iLength = formatLogItem(plile->plis, szOutput, "", TRUE);
formatLogItem(plile->plis, szOutput, "", TRUE);
m_pPlugin->outputToNativeWindow(szOutput);
}
}

Просмотреть файл

@ -514,7 +514,7 @@ LogItemStruct * makeLogItemStruct(NPAPI_Action action,
case action_npp_stream_as_file:
{
// strlen not protected from 0!
char* str = dw3 ? (LPSTR)dw3 : "";
char* str = dw3 ? (char*)dw3 : (char*)"";
plis->arg3.iLength = strlen(str) + 1;
plis->arg3.pData = new char[plis->arg3.iLength];
memcpy(plis->arg3.pData, (LPVOID)str, plis->arg3.iLength);

Просмотреть файл

@ -412,7 +412,9 @@ BOOL PP_WriteString(char * szSection, char * szKey, char * szString, XP_HFILE hF
if(pBuf == NULL)
return FALSE;
#if !(defined XP_MAC || defined XP_UNIX || defined XP_OS2)
long lOldSize = (long)strlen(pBuf);
#endif
char * pSectionStart = goToSectionBody(pBuf, szSection);