mirror of
https://github.com/reactos/reactos.git
synced 2025-04-30 02:58:48 +00:00
[ROSAPPS] Fix GCC8 warnings
This commit is contained in:
parent
f7afca0973
commit
97d937add1
11 changed files with 53 additions and 42 deletions
|
@ -1,4 +1,8 @@
|
|||
|
||||
if(GCC AND GCC_VERSION VERSION_GREATER 7)
|
||||
add_compile_flags("-Wno-stringop-overflow")
|
||||
endif()
|
||||
|
||||
add_executable(createspec createspec.c)
|
||||
set_module_type(createspec win32cui)
|
||||
target_link_libraries(createspec wine)
|
||||
|
|
|
@ -30,13 +30,6 @@ GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect
|
|||
CharacterRect->bottom = CharacterRect->top + CHARACTER_BOX_HEIGHT;
|
||||
}
|
||||
|
||||
__inline VOID
|
||||
GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn)
|
||||
{
|
||||
*uFontRow = uCharacter / 16;
|
||||
*uFontColumn = uCharacter % 16;
|
||||
}
|
||||
|
||||
static INT
|
||||
FontBoxesHitTest(IN UINT xPos, IN UINT yPos, OUT LPRECT CharacterRect)
|
||||
{
|
||||
|
|
|
@ -136,9 +136,14 @@ VOID CreateFontBoxesWindow(PFONT_WND_INFO FontWndInfo);
|
|||
BOOL InitFontBoxesWndClass(VOID);
|
||||
VOID UnInitFontBoxesWndClass(VOID);
|
||||
VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect);
|
||||
__inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn);
|
||||
VOID EditCurrentGlyph(PFONT_WND_INFO FontWndInfo);
|
||||
|
||||
inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn)
|
||||
{
|
||||
*uFontRow = uCharacter / 16;
|
||||
*uFontColumn = uCharacter % 16;
|
||||
}
|
||||
|
||||
// fontwnd.c
|
||||
BOOL CreateFontWindow(PMAIN_WND_INFO MainWndInfo, PFONT_OPEN_INFO OpenInfo);
|
||||
BOOL InitFontWndClass(VOID);
|
||||
|
|
|
@ -209,7 +209,7 @@ PrStatBar(const FTPCIPtr cip, int mode)
|
|||
static double uTotal, uMult;
|
||||
const char *stall;
|
||||
char localName[80];
|
||||
char line[128];
|
||||
char line[134];
|
||||
int i;
|
||||
|
||||
switch (mode) {
|
||||
|
|
|
@ -49,7 +49,7 @@ void CConfig::Default()
|
|||
try {
|
||||
lpsStr = _strdup(dcfgDefaultResource);
|
||||
DefaultResources.Insert(lpsStr);
|
||||
} catch (bad_alloc e) {
|
||||
} catch (bad_alloc&) {
|
||||
free((void *)lpsStr);
|
||||
Clear();
|
||||
throw;
|
||||
|
|
|
@ -486,7 +486,7 @@ VOID CHttpDaemonThread::Execute()
|
|||
delete Daemon;
|
||||
} catch (ESocket e) {
|
||||
ReportErrorStr(e.what());
|
||||
} catch (bad_alloc e) {
|
||||
} catch (bad_alloc&) {
|
||||
ReportErrorStr(TS("Insufficient resources."));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ VOID Run()
|
|||
|
||||
if (pConfiguration != NULL)
|
||||
delete pConfiguration;
|
||||
} catch (bad_alloc e) {
|
||||
} catch (bad_alloc&) {
|
||||
if (pConfiguration != NULL)
|
||||
delete pConfiguration;
|
||||
ReportErrorStr(TS("Insufficient resources."));
|
||||
|
|
|
@ -155,9 +155,9 @@ void text_outp(char *cur_string)
|
|||
while(cur_string[symbol]!=' ')
|
||||
symbol++;
|
||||
|
||||
|
||||
for(;cur_string[symbol]!='\n'; symbol++)
|
||||
putchar(cur_string[symbol]);
|
||||
|
||||
putchar(' ');
|
||||
}
|
||||
|
||||
|
@ -214,12 +214,15 @@ AnalyzeFile()
|
|||
putchar(' ');
|
||||
}
|
||||
|
||||
else text_outp(cur_string); // print plane text
|
||||
else
|
||||
{
|
||||
text_outp(cur_string); // print plane text
|
||||
}
|
||||
th_outp(cur_string, THtag);
|
||||
/* END of TAGs processing */
|
||||
/* END of TAGs processing */
|
||||
|
||||
free(cur_string);
|
||||
free(THtag);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -716,7 +716,9 @@ Paste:
|
|||
ASSERT(dwCompletionOffset <= dwCurrentCharOffset);
|
||||
|
||||
// Save not changing part (context) of completion in m_pchBuffer1
|
||||
_tcsncpy(m_pchBuffer1,m_pchBuffer,dwCompletionOffset);
|
||||
|
||||
// FIXME: dwCompletionOffset is always 0 here
|
||||
// _tcsncpy(m_pchBuffer1,m_pchBuffer,dwCompletionOffset);
|
||||
m_pchBuffer1[dwCompletionOffset] = 0;
|
||||
|
||||
// Size of changing part
|
||||
|
|
|
@ -273,13 +273,17 @@ ConvertDDBtoDIB(PSCREENSHOT pScrSht)
|
|||
else cClrBits = 32;
|
||||
|
||||
if (cClrBits != 24)
|
||||
{
|
||||
pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * (1 << cClrBits));
|
||||
}
|
||||
else
|
||||
{
|
||||
pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
sizeof(BITMAPINFOHEADER));
|
||||
}
|
||||
|
||||
if (!pScrSht->lpbi)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue