Commit 009674dc authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix a couple of clang-cl warnings

parent 6df0bb7d
...@@ -1009,7 +1009,6 @@ static int fix_win_file_permissions(const char *file) ...@@ -1009,7 +1009,6 @@ static int fix_win_file_permissions(const char *file)
ACL* pOldDACL; ACL* pOldDACL;
SECURITY_DESCRIPTOR* pSD = NULL; SECURITY_DESCRIPTOR* pSD = NULL;
EXPLICIT_ACCESS ea = { 0 }; EXPLICIT_ACCESS ea = { 0 };
BOOL isWellKnownSID = FALSE;
PSID pSid = NULL; PSID pSid = NULL;
GetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, GetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL,
...@@ -1029,7 +1028,7 @@ static int fix_win_file_permissions(const char *file) ...@@ -1029,7 +1028,7 @@ static int fix_win_file_permissions(const char *file)
ea.grfInheritance = CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE; ea.grfInheritance = CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE;
ea.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN; ea.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
ACL* pNewDACL = 0; ACL* pNewDACL = 0;
DWORD err = SetEntriesInAcl(1, &ea, pOldDACL, &pNewDACL); SetEntriesInAcl(1, &ea, pOldDACL, &pNewDACL);
if (pNewDACL) if (pNewDACL)
{ {
SetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, SetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL,
......
...@@ -188,7 +188,7 @@ int main(int argc, char **argv) ...@@ -188,7 +188,7 @@ int main(int argc, char **argv)
die("--datadir option not provided, and default datadir not found"); die("--datadir option not provided, and default datadir not found");
my_print_help(my_long_options); my_print_help(my_long_options);
} }
strncat(default_datadir, "\\data", sizeof(default_datadir)); strcat_s(default_datadir, "\\data");
opt_datadir= default_datadir; opt_datadir= default_datadir;
printf("Default data directory is %s\n",opt_datadir); printf("Default data directory is %s\n",opt_datadir);
} }
......
...@@ -513,7 +513,7 @@ int main(int argc, char **argv) ...@@ -513,7 +513,7 @@ int main(int argc, char **argv)
die("Cannot start mysqld.exe process, last error =%u", GetLastError()); die("Cannot start mysqld.exe process, last error =%u", GetLastError());
} }
char pipe_name[64]; char pipe_name[64];
snprintf(pipe_name, sizeof(pipe_name), "\\\\.\\pipe\\mysql_upgrade_service_%u", snprintf(pipe_name, sizeof(pipe_name), "\\\\.\\pipe\\mysql_upgrade_service_%lu",
GetCurrentProcessId()); GetCurrentProcessId());
for (;;) for (;;)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment