diff options
Diffstat (limited to 'src/common/sql.c')
-rw-r--r-- | src/common/sql.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/sql.c b/src/common/sql.c index f6280c436..ed93169ea 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -32,6 +32,7 @@ # include "common/winapi.h" // Needed before mysql.h #endif #include <mysql.h> +#include <stdio.h> #include <stdlib.h> // strtoul void hercules_mysql_error_handler(unsigned int ecode); @@ -466,7 +467,7 @@ static int Sql_P_BindSqlDataType(MYSQL_BIND* bind, enum SqlDataType buffer_type, case SQLDT_BLOB: bind->buffer_type = MYSQL_TYPE_BLOB; break; default: - ShowDebug("Sql_P_BindSqlDataType: unsupported buffer type (%d)\n", buffer_type); + ShowDebug("Sql_P_BindSqlDataType: unsupported buffer type (%u)\n", buffer_type); return SQL_ERROR; } bind->buffer = buffer; @@ -869,7 +870,7 @@ void hercules_mysql_error_handler(unsigned int ecode) { case 2003:/* Can't connect to MySQL (this error only happens here when failing to reconnect) */ if( mysql_reconnect_type == 1 ) { if( ++retry > mysql_reconnect_count ) { - ShowFatalError("MySQL has been unreachable for too long, %d reconnects were attempted. Shutting Down\n", retry); + ShowFatalError("MySQL has been unreachable for too long, %u reconnects were attempted. Shutting Down\n", retry); exit(EXIT_FAILURE); } } @@ -971,7 +972,7 @@ void Sql_HerculesUpdateCheck(Sql* self) { fclose(ifp); if( performed ) { - ShowSQL("- detected %d new "CL_WHITE"SQL updates"CL_RESET"\n",performed); + ShowSQL("- detected %u new "CL_WHITE"SQL updates"CL_RESET"\n",performed); ShowMessage("%s",StrBuf->Value(&buf)); ShowSQL("To manually skip, type: 'sql update skip <file name>'\n"); } |