Here is an example of the warning: https://godbolt.org/z/5EaqfEzza It's not really useful, but also not wrong.
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/mshtml_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 59fbffa078c..5b9b1fac1b5 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -958,8 +958,8 @@ struct HTMLDocumentNode {
nsIDOMDocument *dom_document; nsIDOMHTMLDocument *html_document; - BOOL content_ready : 1; - BOOL unload_sent : 1; + unsigned int content_ready : 1; + unsigned int unload_sent : 1;
IHTMLDOMImplementation *dom_implementation; IHTMLNamespaceCollection *namespaces;
From: Jacek Caban jacek@codeweavers.com
--- dlls/msvcrt/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 24d801a5306..58a607e3bbe 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -109,9 +109,9 @@ typedef struct { unsigned char wxflag; char textmode; char lookahead[3]; - char unicode : 1; - char utf8translations : 1; - char dbcsBufferUsed : 1; + unsigned int unicode : 1; + unsigned int utf8translations : 1; + unsigned int dbcsBufferUsed : 1; char dbcsBuffer[MB_LEN_MAX]; } ioinfo;
From: Jacek Caban jacek@codeweavers.com
--- dlls/ole32/tests/dragdrop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ole32/tests/dragdrop.c b/dlls/ole32/tests/dragdrop.c index cc24efdcbd2..bd63c11401f 100644 --- a/dlls/ole32/tests/dragdrop.c +++ b/dlls/ole32/tests/dragdrop.c @@ -72,7 +72,7 @@ struct method_call HRESULT set_ret; DWORD set_param;
- int called_todo : 1; + BOOL called_todo; };
const struct method_call *call_ptr;
From: Jacek Caban jacek@codeweavers.com
--- programs/regedit/hexedit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/programs/regedit/hexedit.c b/programs/regedit/hexedit.c index d29c916918e..ac47b61dd6e 100644 --- a/programs/regedit/hexedit.c +++ b/programs/regedit/hexedit.c @@ -43,9 +43,9 @@ typedef struct tagHEXEDIT_INFO { HWND hwndSelf; HFONT hFont; - BOOL bFocus : 1; - BOOL bFocusHex : 1; /* TRUE if focus is on hex, FALSE if focus on ASCII */ - BOOL bInsert : 1; /* insert mode if TRUE, overwrite mode if FALSE */ + UINT bFocus : 1; + UINT bFocusHex : 1; /* TRUE if focus is on hex, FALSE if focus on ASCII */ + UINT bInsert : 1; /* insert mode if TRUE, overwrite mode if FALSE */ INT nHeight; /* height of text */ INT nCaretPos; /* caret pos in nibbles */ BYTE *pData;
From: Jacek Caban jacek@codeweavers.com
--- dlls/shell32/shellpath.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index b09b35795fb..015d7cdd4e2 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -3289,9 +3289,9 @@ static HRESULT set_folder_attributes(void) static const struct { const CLSID *clsid; - BOOL wfparsing : 1; - BOOL wfdisplay : 1; - BOOL hideasdel : 1; + unsigned int wfparsing : 1; + unsigned int wfdisplay : 1; + unsigned int hideasdel : 1; DWORD attr; DWORD call_for_attr; } folders[] =
From: Jacek Caban jacek@codeweavers.com
--- dlls/shell32/shellord.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index 56f386c7944..a007c0e5c60 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -306,12 +306,12 @@ VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask) if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0; } else if (dwData == 1) - { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 1; + { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = -1; if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0; } else if (dwData == 2) { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 0; - if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 1; + if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = -1; } } RegCloseKey (hKey); @@ -1182,15 +1182,15 @@ BOOL WINAPI ReadCabinetState(CABINETSTATE *cs, int length) memset(cs, 0, sizeof(*cs)); cs->cLength = sizeof(*cs); cs->nVersion = 2; - cs->fFullPathTitle = FALSE; - cs->fSaveLocalView = TRUE; - cs->fNotShell = FALSE; - cs->fSimpleDefault = TRUE; - cs->fDontShowDescBar = FALSE; - cs->fNewWindowMode = FALSE; - cs->fShowCompColor = FALSE; - cs->fDontPrettyNames = FALSE; - cs->fAdminsCreateCommonGroups = TRUE; + cs->fFullPathTitle = 0; + cs->fSaveLocalView = -1; + cs->fNotShell = 0; + cs->fSimpleDefault = -1; + cs->fDontShowDescBar = 0; + cs->fNewWindowMode = 0; + cs->fShowCompColor = 0; + cs->fDontPrettyNames = 0; + cs->fAdminsCreateCommonGroups = -1; cs->fMenuEnumFilter = 96; }
FWIW, I used explicit argument in the example, but it's generally enabled by default.
This merge request was approved by Piotr Caban.