mirror of
https://github.com/reactos/reactos.git
synced 2025-04-29 18:48:53 +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);
|
||||
|
|
|
@ -246,15 +246,15 @@ public:
|
|||
if (pDragSourceHelper == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
SHDRAGIMAGE di;
|
||||
BITMAP bm;
|
||||
GetObject(hBitmap, sizeof(bm), &bm);
|
||||
di.sizeDragImage.cx = bm.bmWidth;
|
||||
di.sizeDragImage.cy = bm.bmHeight;
|
||||
di.hbmpDragImage = hBitmap;
|
||||
di.crColorKey = crColorKey;
|
||||
di.ptOffset.x = pt.x - rc.left;
|
||||
di.ptOffset.y = pt.y - rc.top;
|
||||
SHDRAGIMAGE di;
|
||||
BITMAP bm;
|
||||
GetObject(hBitmap, sizeof(bm), &bm);
|
||||
di.sizeDragImage.cx = bm.bmWidth;
|
||||
di.sizeDragImage.cy = bm.bmHeight;
|
||||
di.hbmpDragImage = hBitmap;
|
||||
di.crColorKey = crColorKey;
|
||||
di.ptOffset.x = pt.x - rc.left;
|
||||
di.ptOffset.y = pt.y - rc.top;
|
||||
return pDragSourceHelper->InitializeFromBitmap(&di, pDataObject);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -461,22 +461,22 @@ VOID CHttpDaemonThread::Execute()
|
|||
case HTTPD_START: {
|
||||
if (Daemon->GetState() == hsStopped)
|
||||
Daemon->Start();
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case HTTPD_STOP: {
|
||||
if (Daemon->GetState() == hsRunning)
|
||||
Daemon->Stop();
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case HTTPD_SUSPEND: {
|
||||
if (Daemon->GetState() == hsRunning){}
|
||||
// FIXME: Suspend service
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case HTTPD_RESUME: {
|
||||
if (Daemon->GetState() != hsSuspended){}
|
||||
// FIXME: Resume service
|
||||
break;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
DispatchMessage(&Msg);
|
||||
|
@ -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,10 +155,10 @@ void text_outp(char *cur_string)
|
|||
while(cur_string[symbol]!=' ')
|
||||
symbol++;
|
||||
|
||||
|
||||
for(;cur_string[symbol]!='\n'; symbol++)
|
||||
putchar(cur_string[symbol]);
|
||||
putchar(' ');
|
||||
|
||||
putchar(' ');
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -214,13 +214,16 @@ AnalyzeFile()
|
|||
putchar(' ');
|
||||
}
|
||||
|
||||
else text_outp(cur_string); // print plane text
|
||||
th_outp(cur_string, THtag);
|
||||
/* END of TAGs processing */
|
||||
free(cur_string);
|
||||
free(THtag);
|
||||
else
|
||||
{
|
||||
text_outp(cur_string); // print plane text
|
||||
}
|
||||
th_outp(cur_string, THtag);
|
||||
/* END of TAGs processing */
|
||||
|
||||
return 0;
|
||||
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
|
||||
|
|
|
@ -272,14 +272,18 @@ ConvertDDBtoDIB(PSCREENSHOT pScrSht)
|
|||
cClrBits = 24;
|
||||
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 (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