Skip to content

Commit

Permalink
Bug#34114909 Fix compiler warnings from clang on Windows [noclose]
Browse files Browse the repository at this point in the history
Post-push fix for : WL#15166 patch #1 ndb_sign_keys

DWORD is 'unsigned long' not int
Remove an unused local variable.
C-style cast (LPSTR) drops const qualifier [-Wcast-qual]

Change-Id: I059ad8a5a5f6b1cc644456576a8acff9a78331e3
  • Loading branch information
Tor Didriksen committed Jul 18, 2023
1 parent 0f8620f commit b081ef0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions storage/ndb/include/portlib/NdbProcess.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ inline void NdbProcess::printerror()
NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&message, 0, NULL);

fprintf(stderr, "Function failed, error: %d, message: '%s'", err, message);
fprintf(stderr, "Function failed, error: %lu, message: '%s'", err, message);
LocalFree(message);
}

Expand Down Expand Up @@ -270,7 +270,6 @@ inline bool NdbProcess::start_process(process_handle_t & pid,
std::string final_arg(path);
final_arg.append(" ");
final_arg.append(args_str.c_str());
LPSTR r = (LPSTR)final_arg.c_str();

if(pipes) {
static constexpr int Inherit = HANDLE_FLAG_INHERIT;
Expand All @@ -285,7 +284,7 @@ inline bool NdbProcess::start_process(process_handle_t & pid,
// Start the child process.
if (!CreateProcess(
path, // Application Name
(LPSTR)final_arg.c_str(), // command line
(LPSTR)const_cast<char *>(final_arg.c_str()), // command line
nullptr, // process security attributes
nullptr, // primary thread security attributes
(bool) pipes, // Flag allowing pipe handles to be inherited
Expand Down

0 comments on commit b081ef0

Please sign in to comment.