1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Fix gcc warnings

This commit is contained in:
Georg Richter
2019-09-04 09:36:20 +02:00
parent f0432c98c9
commit 9faaea38bc
2 changed files with 4 additions and 0 deletions

View File

@@ -38,7 +38,9 @@
{ \ { \
(a)->last_errno= (b);\ (a)->last_errno= (b);\
strncpy((a)->sqlstate, (c), SQLSTATE_LENGTH);\ strncpy((a)->sqlstate, (c), SQLSTATE_LENGTH);\
(a)->sqlstate[SQLSTATE_LENGTH]= 0;\
strncpy((a)->last_error, (d) ? (d) : ER((b)), MYSQL_ERRMSG_SIZE - 1);\ strncpy((a)->last_error, (d) ? (d) : ER((b)), MYSQL_ERRMSG_SIZE - 1);\
(a)->last_error[MYSQL_ERRMSG_SIZE - 1]= 0;\
} }
#define CLEAR_CLIENT_STMT_ERROR(a) \ #define CLEAR_CLIENT_STMT_ERROR(a) \

View File

@@ -125,7 +125,9 @@ extern unsigned int mariadb_deinitialize_ssl;
{ \ { \
(a)->net.last_errno= (b);\ (a)->net.last_errno= (b);\
strncpy((a)->net.sqlstate, (c), SQLSTATE_LENGTH);\ strncpy((a)->net.sqlstate, (c), SQLSTATE_LENGTH);\
(a)->net.sqlstate[SQLSTATE_LENGTH]= 0;\
strncpy((a)->net.last_error, (d) ? (d) : ER((b)), MYSQL_ERRMSG_SIZE - 1);\ strncpy((a)->net.last_error, (d) ? (d) : ER((b)), MYSQL_ERRMSG_SIZE - 1);\
(a)->net.last_error[MYSQL_ERRMSG_SIZE - 1]= 0;\
} }
/* For mysql_async.c */ /* For mysql_async.c */