mirror of
https://github.com/reactos/reactos.git
synced 2025-04-30 19:19:00 +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)
|
add_executable(createspec createspec.c)
|
||||||
set_module_type(createspec win32cui)
|
set_module_type(createspec win32cui)
|
||||||
target_link_libraries(createspec wine)
|
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;
|
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
|
static INT
|
||||||
FontBoxesHitTest(IN UINT xPos, IN UINT yPos, OUT LPRECT CharacterRect)
|
FontBoxesHitTest(IN UINT xPos, IN UINT yPos, OUT LPRECT CharacterRect)
|
||||||
{
|
{
|
||||||
|
|
|
@ -136,9 +136,14 @@ VOID CreateFontBoxesWindow(PFONT_WND_INFO FontWndInfo);
|
||||||
BOOL InitFontBoxesWndClass(VOID);
|
BOOL InitFontBoxesWndClass(VOID);
|
||||||
VOID UnInitFontBoxesWndClass(VOID);
|
VOID UnInitFontBoxesWndClass(VOID);
|
||||||
VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect);
|
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);
|
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
|
// fontwnd.c
|
||||||
BOOL CreateFontWindow(PMAIN_WND_INFO MainWndInfo, PFONT_OPEN_INFO OpenInfo);
|
BOOL CreateFontWindow(PMAIN_WND_INFO MainWndInfo, PFONT_OPEN_INFO OpenInfo);
|
||||||
BOOL InitFontWndClass(VOID);
|
BOOL InitFontWndClass(VOID);
|
||||||
|
|
|
@ -209,7 +209,7 @@ PrStatBar(const FTPCIPtr cip, int mode)
|
||||||
static double uTotal, uMult;
|
static double uTotal, uMult;
|
||||||
const char *stall;
|
const char *stall;
|
||||||
char localName[80];
|
char localName[80];
|
||||||
char line[128];
|
char line[134];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
|
|
|
@ -49,7 +49,7 @@ void CConfig::Default()
|
||||||
try {
|
try {
|
||||||
lpsStr = _strdup(dcfgDefaultResource);
|
lpsStr = _strdup(dcfgDefaultResource);
|
||||||
DefaultResources.Insert(lpsStr);
|
DefaultResources.Insert(lpsStr);
|
||||||
} catch (bad_alloc e) {
|
} catch (bad_alloc&) {
|
||||||
free((void *)lpsStr);
|
free((void *)lpsStr);
|
||||||
Clear();
|
Clear();
|
||||||
throw;
|
throw;
|
||||||
|
|
|
@ -486,7 +486,7 @@ VOID CHttpDaemonThread::Execute()
|
||||||
delete Daemon;
|
delete Daemon;
|
||||||
} catch (ESocket e) {
|
} catch (ESocket e) {
|
||||||
ReportErrorStr(e.what());
|
ReportErrorStr(e.what());
|
||||||
} catch (bad_alloc e) {
|
} catch (bad_alloc&) {
|
||||||
ReportErrorStr(TS("Insufficient resources."));
|
ReportErrorStr(TS("Insufficient resources."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ VOID Run()
|
||||||
|
|
||||||
if (pConfiguration != NULL)
|
if (pConfiguration != NULL)
|
||||||
delete pConfiguration;
|
delete pConfiguration;
|
||||||
} catch (bad_alloc e) {
|
} catch (bad_alloc&) {
|
||||||
if (pConfiguration != NULL)
|
if (pConfiguration != NULL)
|
||||||
delete pConfiguration;
|
delete pConfiguration;
|
||||||
ReportErrorStr(TS("Insufficient resources."));
|
ReportErrorStr(TS("Insufficient resources."));
|
||||||
|
|
|
@ -155,9 +155,9 @@ void text_outp(char *cur_string)
|
||||||
while(cur_string[symbol]!=' ')
|
while(cur_string[symbol]!=' ')
|
||||||
symbol++;
|
symbol++;
|
||||||
|
|
||||||
|
|
||||||
for(;cur_string[symbol]!='\n'; symbol++)
|
for(;cur_string[symbol]!='\n'; symbol++)
|
||||||
putchar(cur_string[symbol]);
|
putchar(cur_string[symbol]);
|
||||||
|
|
||||||
putchar(' ');
|
putchar(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,12 +214,15 @@ AnalyzeFile()
|
||||||
putchar(' ');
|
putchar(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
else text_outp(cur_string); // print plane text
|
else
|
||||||
|
{
|
||||||
|
text_outp(cur_string); // print plane text
|
||||||
|
}
|
||||||
th_outp(cur_string, THtag);
|
th_outp(cur_string, THtag);
|
||||||
/* END of TAGs processing */
|
/* END of TAGs processing */
|
||||||
|
|
||||||
free(cur_string);
|
free(cur_string);
|
||||||
free(THtag);
|
free(THtag);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -716,7 +716,9 @@ Paste:
|
||||||
ASSERT(dwCompletionOffset <= dwCurrentCharOffset);
|
ASSERT(dwCompletionOffset <= dwCurrentCharOffset);
|
||||||
|
|
||||||
// Save not changing part (context) of completion in m_pchBuffer1
|
// 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;
|
m_pchBuffer1[dwCompletionOffset] = 0;
|
||||||
|
|
||||||
// Size of changing part
|
// Size of changing part
|
||||||
|
|
|
@ -273,13 +273,17 @@ ConvertDDBtoDIB(PSCREENSHOT pScrSht)
|
||||||
else cClrBits = 32;
|
else cClrBits = 32;
|
||||||
|
|
||||||
if (cClrBits != 24)
|
if (cClrBits != 24)
|
||||||
|
{
|
||||||
pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(),
|
pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(),
|
||||||
0,
|
0,
|
||||||
sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * (1 << cClrBits));
|
sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * (1 << cClrBits));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(),
|
pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(),
|
||||||
0,
|
0,
|
||||||
sizeof(BITMAPINFOHEADER));
|
sizeof(BITMAPINFOHEADER));
|
||||||
|
}
|
||||||
|
|
||||||
if (!pScrSht->lpbi)
|
if (!pScrSht->lpbi)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue