Skip to content

Commit

Permalink
[misc] fix the use of invalid "%luX" formatter
Browse files Browse the repository at this point in the history
* "%luX" is invalid as "X" already means unsigned hexadecimal so there's no need for "u"
  • Loading branch information
pbatard committed Jun 2, 2016
1 parent c2fc113 commit 07497fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/dev.c
Expand Up @@ -175,7 +175,7 @@ BOOL GetDevices(DWORD devnum)
const char* genstor_name[] = {
// Generic storage drivers (Careful now!)
"SCSI", // "STORAGE", // "STORAGE" is used by 'Storage Spaces" and stuff => DANGEROUS!
// Non-USB card reader drivers - *MUST* start with "SD" (delimiter)
// Non-USB card reader drivers - This list *MUST* start with "SD" (delimiter)
// See http://itdoc.hitachi.co.jp/manuals/3021/30213B5200e/DMDS0094.HTM
// Also http://www.carrona.org/dvrref.php. NB: These should be reported
// as enumerators by Rufus when Enum Debug is enabled
Expand Down
2 changes: 1 addition & 1 deletion src/net.c
Expand Up @@ -203,7 +203,7 @@ const char* WinInetErrorString(void)
InternetGetLastResponseInfoA(&error_code, error_string, &size);
return error_string;
default:
safe_sprintf(error_string, sizeof(error_string), "Unknown internet error 0x%08luX", error_code);
safe_sprintf(error_string, sizeof(error_string), "Unknown internet error 0x%08lX", error_code);
return error_string;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/rufus.rc
Expand Up @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 2.10.945"
CAPTION "Rufus 2.10.946"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
Expand Down Expand Up @@ -320,8 +320,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,10,945,0
PRODUCTVERSION 2,10,945,0
FILEVERSION 2,10,946,0
PRODUCTVERSION 2,10,946,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -338,13 +338,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.10.945"
VALUE "FileVersion", "2.10.946"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "� 2011-2016 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.10.945"
VALUE "ProductVersion", "2.10.946"
END
END
BLOCK "VarFileInfo"
Expand Down
6 changes: 3 additions & 3 deletions src/stdio.c
Expand Up @@ -148,7 +148,7 @@ static char err_string[256] = {0};

error_code = GetLastError();

safe_sprintf(err_string, sizeof(err_string), "[0x%08luX] ", error_code);
safe_sprintf(err_string, sizeof(err_string), "[0x%08lX] ", error_code);

size = FormatMessageU(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, HRESULT_CODE(error_code),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &err_string[strlen(err_string)],
Expand All @@ -157,9 +157,9 @@ static char err_string[256] = {0};
format_error = GetLastError();
if ((format_error) && (format_error != 0x13D)) // 0x13D, decode error, is returned for unknown codes
safe_sprintf(err_string, sizeof(err_string),
"Windows error code 0x%08luX (FormatMessage error code 0x%08luX)", error_code, format_error);
"Windows error code 0x%08lX (FormatMessage error code 0x%08lX)", error_code, format_error);
else
safe_sprintf(err_string, sizeof(err_string), "Unknown error 0x%08luX", error_code);
safe_sprintf(err_string, sizeof(err_string), "Unknown error 0x%08lX", error_code);
}

SetLastError(error_code); // Make sure we don't change the errorcode on exit
Expand Down

0 comments on commit 07497fc

Please sign in to comment.