diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc index 161486fbe39..176d607fe1c 100644 --- a/extra/mariabackup/backup_copy.cc +++ b/extra/mariabackup/backup_copy.cc @@ -1009,7 +1009,6 @@ static int fix_win_file_permissions(const char *file) ACL* pOldDACL; SECURITY_DESCRIPTOR* pSD = NULL; EXPLICIT_ACCESS ea = { 0 }; - BOOL isWellKnownSID = FALSE; PSID pSid = NULL; GetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, @@ -1029,7 +1028,7 @@ static int fix_win_file_permissions(const char *file) ea.grfInheritance = CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE; ea.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN; ACL* pNewDACL = 0; - DWORD err = SetEntriesInAcl(1, &ea, pOldDACL, &pNewDACL); + SetEntriesInAcl(1, &ea, pOldDACL, &pNewDACL); if (pNewDACL) { SetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc index 85507a0abde..54bd46240bc 100644 --- a/sql/mysql_install_db.cc +++ b/sql/mysql_install_db.cc @@ -188,7 +188,7 @@ int main(int argc, char **argv) die("--datadir option not provided, and default datadir not found"); my_print_help(my_long_options); } - strncat(default_datadir, "\\data", sizeof(default_datadir)); + strcat_s(default_datadir, "\\data"); opt_datadir= default_datadir; printf("Default data directory is %s\n",opt_datadir); } diff --git a/sql/mysql_upgrade_service.cc b/sql/mysql_upgrade_service.cc index 6a15364c849..05e2e970e6c 100644 --- a/sql/mysql_upgrade_service.cc +++ b/sql/mysql_upgrade_service.cc @@ -513,7 +513,7 @@ int main(int argc, char **argv) die("Cannot start mysqld.exe process, last error =%u", GetLastError()); } 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()); for (;;) {