1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[misc] fix VS2017 code analysis warnings

* Also set rufus-next to 2.18
This commit is contained in:
Pete Batard 2017-09-14 19:06:04 +01:00
parent 44c9cb0b82
commit 13ba3e75b3
8 changed files with 34 additions and 34 deletions

20
configure vendored
View file

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for rufus 2.17. # Generated by GNU Autoconf 2.69 for rufus 2.18.
# #
# Report bugs to <https://github.com/pbatard/rufus/issues>. # Report bugs to <https://github.com/pbatard/rufus/issues>.
# #
@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='rufus' PACKAGE_NAME='rufus'
PACKAGE_TARNAME='rufus' PACKAGE_TARNAME='rufus'
PACKAGE_VERSION='2.17' PACKAGE_VERSION='2.18'
PACKAGE_STRING='rufus 2.17' PACKAGE_STRING='rufus 2.18'
PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues' PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues'
PACKAGE_URL='https://rufus.akeo.ie' PACKAGE_URL='https://rufus.akeo.ie'
@ -1228,7 +1228,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures rufus 2.17 to adapt to many kinds of systems. \`configure' configures rufus 2.18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1294,7 +1294,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of rufus 2.17:";; short | recursive ) echo "Configuration of rufus 2.18:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1385,7 +1385,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
rufus configure 2.17 rufus configure 2.18
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@ -1440,7 +1440,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by rufus $as_me 2.17, which was It was created by rufus $as_me 2.18, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@ -2303,7 +2303,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='rufus' PACKAGE='rufus'
VERSION='2.17' VERSION='2.18'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -4483,7 +4483,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by rufus $as_me 2.17, which was This file was extended by rufus $as_me 2.18, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -4537,7 +4537,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
rufus config.status 2.17 rufus config.status 2.18
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View file

@ -1,4 +1,4 @@
AC_INIT([rufus], [2.17], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie]) AC_INIT([rufus], [2.18], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie])
AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies]) AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies])
AC_CONFIG_SRCDIR([src/rufus.c]) AC_CONFIG_SRCDIR([src/rufus.c])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])

View file

@ -8,7 +8,7 @@
for an interesting struggle, when you also happen to have a comma in one of the fields... --> for an interesting struggle, when you also happen to have a comma in one of the fields... -->
<Identity <Identity
Name="Rufus" Name="Rufus"
Version="2.17.1198.0" Version="2.18.1198.0"
ProcessorArchitecture="x86" ProcessorArchitecture="x86"
Publisher='CN=Akeo Consulting, O=Akeo Consulting, STREET="24, Grey Rock", L=Milford, S=Co Donegal, PostalCode=Co Donegal, C=IE' /> Publisher='CN=Akeo Consulting, O=Akeo Consulting, STREET="24, Grey Rock", L=Milford, S=Co Donegal, PostalCode=Co Donegal, C=IE' />
<Properties> <Properties>

View file

@ -1,5 +1,5 @@
@echo off @echo off
set VERSION=2.17 set VERSION=2.18
rem Make sure you don't have anything you don't want included in the package, as anything residing in the rem Make sure you don't have anything you don't want included in the package, as anything residing in the
rem current directory will be included, including any previous .appx, which makes for nice recursion... rem current directory will be included, including any previous .appx, which makes for nice recursion...

View file

@ -66,7 +66,7 @@
/* Globals */ /* Globals */
char sum_str[CHECKSUM_MAX][65]; char sum_str[CHECKSUM_MAX][65];
uint32_t bufnum, sum_count[CHECKSUM_MAX] = { 16, 20, 32 }; uint32_t bufnum, sum_count[CHECKSUM_MAX] = { 16, 20, 32 };
HANDLE data_ready[CHECKSUM_MAX], thread_ready[CHECKSUM_MAX]; HANDLE data_ready[CHECKSUM_MAX] = { 0 }, thread_ready[CHECKSUM_MAX] = { 0 };
DWORD read_size[2]; DWORD read_size[2];
unsigned char ALIGNED(64) buffer[2][BUFFER_SIZE]; unsigned char ALIGNED(64) buffer[2][BUFFER_SIZE];
@ -886,7 +886,7 @@ DWORD WINAPI SumThread(void* param)
float format_percent = 0.0f; float format_percent = 0.0f;
if ((image_path == NULL) || (thread_affinity == NULL)) if ((image_path == NULL) || (thread_affinity == NULL))
goto out; ExitThread(r);
uprintf("\r\nComputing checksum for '%s'...", image_path); uprintf("\r\nComputing checksum for '%s'...", image_path);
@ -985,8 +985,8 @@ out:
for (i = 0; i < CHECKSUM_MAX; i++) { for (i = 0; i < CHECKSUM_MAX; i++) {
if (sum_thread[i] != NULL) if (sum_thread[i] != NULL)
TerminateThread(sum_thread[i], 1); TerminateThread(sum_thread[i], 1);
CloseHandle(data_ready[i]); safe_closehandle(data_ready[i]);
CloseHandle(thread_ready[i]); safe_closehandle(thread_ready[i]);
} }
safe_closehandle(h); safe_closehandle(h);
PostMessage(hMainDialog, UM_FORMAT_COMPLETED, (WPARAM)FALSE, 0); PostMessage(hMainDialog, UM_FORMAT_COMPLETED, (WPARAM)FALSE, 0);

View file

@ -258,7 +258,7 @@ out:
static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo)
{ {
BOOL r, found = FALSE; BOOL r, found = FALSE;
DWORD n, dwSize; DWORD n, dwSize = 0;
PCRYPT_CONTENT_INFO pCounterSignerInfo = NULL; PCRYPT_CONTENT_INFO pCounterSignerInfo = NULL;
uint64_t ts = 0ULL; uint64_t ts = 0ULL;
uint8_t *timestamp_token; uint8_t *timestamp_token;
@ -318,7 +318,7 @@ static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo)
static uint64_t GetNestedRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) static uint64_t GetNestedRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo)
{ {
BOOL r, found = FALSE; BOOL r, found = FALSE;
DWORD n, dwSize; DWORD n, dwSize = 0;
PCRYPT_CONTENT_INFO pNestedSignature = NULL; PCRYPT_CONTENT_INFO pNestedSignature = NULL;
PCMSG_SIGNER_INFO pNestedSignerInfo = NULL; PCMSG_SIGNER_INFO pNestedSignerInfo = NULL;
HCRYPTMSG hMsg = NULL; HCRYPTMSG hMsg = NULL;

View file

@ -83,7 +83,7 @@ static __inline BOOL _GetRegistryKey(HKEY key_root, const char* key_name, DWORD
break; break;
} }
if (i != 0) { if (i > 0) {
// Prefix with "SOFTWARE" if needed // Prefix with "SOFTWARE" if needed
if (_strnicmp(key_name, software_prefix, sizeof(software_prefix) - 1) != 0) { if (_strnicmp(key_name, software_prefix, sizeof(software_prefix) - 1) != 0) {
if (i + sizeof(software_prefix) >= sizeof(long_key_name)) if (i + sizeof(software_prefix) >= sizeof(long_key_name))
@ -151,14 +151,7 @@ static __inline BOOL _SetRegistryKey(HKEY key_root, const char* key_name, DWORD
break; break;
} }
if (i == 0) { if (i > 0) {
// If this is a short key name, store the value under our app sub-hive
if (RegCreateKeyExA(hRoot, "SOFTWARE\\" COMPANY_NAME "\\" APPLICATION_NAME, 0, NULL, 0,
KEY_SET_VALUE | KEY_QUERY_VALUE | KEY_CREATE_SUB_KEY, NULL, &hApp, &dwDisp) != ERROR_SUCCESS) {
hApp = NULL;
goto out;
}
} else {
// Prefix with "SOFTWARE" if needed // Prefix with "SOFTWARE" if needed
if (_strnicmp(key_name, software_prefix, sizeof(software_prefix) - 1) != 0) { if (_strnicmp(key_name, software_prefix, sizeof(software_prefix) - 1) != 0) {
if (i + sizeof(software_prefix) >= sizeof(long_key_name)) if (i + sizeof(software_prefix) >= sizeof(long_key_name))
@ -178,6 +171,13 @@ static __inline BOOL _SetRegistryKey(HKEY key_root, const char* key_name, DWORD
hApp = NULL; hApp = NULL;
goto out; goto out;
} }
} else {
// This is a short key name, store the value under our app sub-hive
if (RegCreateKeyExA(hRoot, "SOFTWARE\\" COMPANY_NAME "\\" APPLICATION_NAME, 0, NULL, 0,
KEY_SET_VALUE | KEY_QUERY_VALUE | KEY_CREATE_SUB_KEY, NULL, &hApp, &dwDisp) != ERROR_SUCCESS) {
hApp = NULL;
goto out;
}
} }
r = (RegSetValueExA(hApp, &key_name[i], 0, dwType, src, src_size) == ERROR_SUCCESS); r = (RegSetValueExA(hApp, &key_name[i], 0, dwType, src, src_size) == ERROR_SUCCESS);

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 376 IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 2.17.1199" CAPTION "Rufus 2.18.1200"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0 FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
@ -366,8 +366,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,17,1199,0 FILEVERSION 2,18,1200,0
PRODUCTVERSION 2,17,1199,0 PRODUCTVERSION 2,18,1200,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -384,13 +384,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.17.1199" VALUE "FileVersion", "2.18.1200"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.17.1199" VALUE "ProductVersion", "2.18.1200"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"