Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSInfo.cpp: Fix MinGW compilation warnings #2804

Merged
merged 1 commit into from Feb 3, 2017

Conversation

@davidebeatrici
Copy link
Member

commented Feb 3, 2017

../OSInfo.cpp:74:113: warning: passing NULL to non-pointer argument 3 of 'LONG RegOpenKeyExW(HKEY, LPCWSTR, DWORD, REGSAM, PHKEY)' [-Wconversion-null]
  err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", NULL, KEY_READ, &key);
                                                                                                                 ^
../OSInfo.cpp: In static member function 'static QString OSInfo::getOSVersion()':
../OSInfo.cpp:197:135: warning: format '%d' expects argument of type 'int', but argument 3 has type 'DWORD {aka long unsigned int}' [-Wformat=]
  os.sprintf("%d.%d.%d.%d", ovi.dwMajorVersion, ovi.dwMinorVersion, ovi.dwBuildNumber, (ovi.wProductType == VER_NT_WORKSTATION) ? 1 : 0);
                                                                                                                                       ^
../OSInfo.cpp:197:135: warning: format '%d' expects argument of type 'int', but argument 4 has type 'DWORD {aka long unsigned int}' [-Wformat=]
../OSInfo.cpp:197:135: warning: format '%d' expects argument of type 'int', but argument 5 has type 'DWORD {aka long unsigned int}' [-Wformat=]
../OSInfo.cpp: In static member function 'static QString OSInfo::getOSDisplayableVersion()':
../OSInfo.cpp:466:86: warning: format '%d' expects argument of type 'int', but argument 3 has type 'DWORD {aka long unsigned int}' [-Wformat=]
  osv.sprintf(" - %d.%d.%d", ovi.dwMajorVersion, ovi.dwMinorVersion, ovi.dwBuildNumber);
                                                                                      ^
../OSInfo.cpp:466:86: warning: format '%d' expects argument of type 'int', but argument 4 has type 'DWORD {aka long unsigned int}' [-Wformat=]
../OSInfo.cpp:466:86: warning: format '%d' expects argument of type 'int', but argument 5 has type 'DWORD {aka long unsigned int}' [-Wformat=]

@davidebeatrici davidebeatrici added the build label Feb 3, 2017

OSInfo.cpp: Fix MinGW compilation warnings
../OSInfo.cpp:74:113: warning: passing NULL to non-pointer argument 3 of 'LONG RegOpenKeyExW(HKEY, LPCWSTR, DWORD, REGSAM, PHKEY)' [-Wconversion-null]
  err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", NULL, KEY_READ, &key);
                                                                                                                 ^
../OSInfo.cpp: In static member function 'static QString OSInfo::getOSVersion()':
../OSInfo.cpp:197:135: warning: format '%d' expects argument of type 'int', but argument 3 has type 'DWORD {aka long unsigned int}' [-Wformat=]
  os.sprintf("%d.%d.%d.%d", ovi.dwMajorVersion, ovi.dwMinorVersion, ovi.dwBuildNumber, (ovi.wProductType == VER_NT_WORKSTATION) ? 1 : 0);
                                                                                                                                       ^
../OSInfo.cpp:197:135: warning: format '%d' expects argument of type 'int', but argument 4 has type 'DWORD {aka long unsigned int}' [-Wformat=]
../OSInfo.cpp:197:135: warning: format '%d' expects argument of type 'int', but argument 5 has type 'DWORD {aka long unsigned int}' [-Wformat=]
../OSInfo.cpp: In static member function 'static QString OSInfo::getOSDisplayableVersion()':
../OSInfo.cpp:466:86: warning: format '%d' expects argument of type 'int', but argument 3 has type 'DWORD {aka long unsigned int}' [-Wformat=]
  osv.sprintf(" - %d.%d.%d", ovi.dwMajorVersion, ovi.dwMinorVersion, ovi.dwBuildNumber);
                                                                                      ^
../OSInfo.cpp:466:86: warning: format '%d' expects argument of type 'int', but argument 4 has type 'DWORD {aka long unsigned int}' [-Wformat=]
../OSInfo.cpp:466:86: warning: format '%d' expects argument of type 'int', but argument 5 has type 'DWORD {aka long unsigned int}' [-Wformat=]

@davidebeatrici davidebeatrici force-pushed the davidebeatrici:OSInfo.cpp_fix-warnings branch from 7f57226 to 625d1ce Feb 3, 2017

@mkrautz
mkrautz approved these changes Feb 3, 2017

@mkrautz mkrautz merged commit 4886268 into mumble-voip:master Feb 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.