Fix unused function warnings

This commit is contained in:
Evan Miller
2020-08-10 17:04:11 -04:00
parent abe7ebcb74
commit 280075a3e2

View File

@@ -207,6 +207,9 @@ static SQLRETURN SQL_API _SQLDriverConnect(
SQLSMALLINT cbConnStrOutMax, SQLSMALLINT cbConnStrOutMax,
SQLSMALLINT *pcbConnStrOut, SQLSMALLINT *pcbConnStrOut,
SQLUSMALLINT fDriverCompletion) SQLUSMALLINT fDriverCompletion)
#ifdef HAVE_ATTRIBUTE_ALIAS
__attribute__((used));
#endif
{ {
char* dsn = NULL; char* dsn = NULL;
char* database = NULL; char* database = NULL;
@@ -671,6 +674,9 @@ static SQLRETURN SQL_API _SQLConnect(
SQLSMALLINT cbUID, SQLSMALLINT cbUID,
SQLCHAR *szAuthStr, SQLCHAR *szAuthStr,
SQLSMALLINT cbAuthStr) SQLSMALLINT cbAuthStr)
#ifdef HAVE_ATTRIBUTE_ALIAS
__attribute__((used));
#endif
{ {
char* database = NULL; char* database = NULL;
ConnectParams* params; ConnectParams* params;
@@ -751,6 +757,9 @@ static SQLRETURN SQL_API _SQLDescribeCol(
SQLULEN *pcbColDef, /* precision */ SQLULEN *pcbColDef, /* precision */
SQLSMALLINT *pibScale, SQLSMALLINT *pibScale,
SQLSMALLINT *pfNullable) SQLSMALLINT *pfNullable)
#ifdef HAVE_ATTRIBUTE_ALIAS
__attribute__((used));
#endif
{ {
int i; int i;
struct _hstmt *stmt = (struct _hstmt *) hstmt; struct _hstmt *stmt = (struct _hstmt *) hstmt;
@@ -858,6 +867,9 @@ static SQLRETURN SQL_API _SQLColAttributes(
SQLSMALLINT cbDescMax, SQLSMALLINT cbDescMax,
SQLSMALLINT *pcbDesc, SQLSMALLINT *pcbDesc,
SQLLEN *pfDesc) SQLLEN *pfDesc)
#ifdef HAVE_ATTRIBUTE_ALIAS
__attribute__((used));
#endif
{ {
int i; int i;
struct _hstmt *stmt; struct _hstmt *stmt;
@@ -1018,6 +1030,9 @@ static SQLRETURN SQL_API _SQLError(
SQLCHAR *szErrorMsg, SQLCHAR *szErrorMsg,
SQLSMALLINT cbErrorMsgMax, SQLSMALLINT cbErrorMsgMax,
SQLSMALLINT *pcbErrorMsg) SQLSMALLINT *pcbErrorMsg)
#ifdef HAVE_ATTRIBUTE_ALIAS
__attribute__((used));
#endif
{ {
SQLRETURN result = SQL_NO_DATA_FOUND; SQLRETURN result = SQL_NO_DATA_FOUND;
@@ -1110,6 +1125,9 @@ static SQLRETURN SQL_API _SQLExecDirect(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLCHAR *szSqlStr, SQLCHAR *szSqlStr,
SQLINTEGER cbSqlStr) SQLINTEGER cbSqlStr)
#ifdef HAVE_ATTRIBUTE_ALIAS
__attribute__((used));
#endif
{ {
_SQLPrepare(hstmt, szSqlStr, cbSqlStr); _SQLPrepare(hstmt, szSqlStr, cbSqlStr);
return _SQLExecute(hstmt); return _SQLExecute(hstmt);
@@ -1436,6 +1454,9 @@ static SQLRETURN SQL_API _SQLColumns(
SQLSMALLINT cbTableName, SQLSMALLINT cbTableName,
SQLCHAR *szColumnName, SQLCHAR *szColumnName,
SQLSMALLINT cbColumnName) SQLSMALLINT cbColumnName)
#ifdef HAVE_ATTRIBUTE_ALIAS
__attribute__((used));
#endif
{ {
struct _hstmt *stmt = (struct _hstmt *) hstmt; struct _hstmt *stmt = (struct _hstmt *) hstmt;
MdbSQL *sql = stmt->sql; MdbSQL *sql = stmt->sql;
@@ -1581,6 +1602,9 @@ static SQLRETURN SQL_API _SQLGetData(
SQLPOINTER rgbValue, SQLPOINTER rgbValue,
SQLLEN cbValueMax, SQLLEN cbValueMax,
SQLLEN *pcbValue) SQLLEN *pcbValue)
#ifdef HAVE_ATTRIBUTE_ALIAS
__attribute__((used));
#endif
{ {
struct _hstmt *stmt; struct _hstmt *stmt;
MdbSQL *sql; MdbSQL *sql;
@@ -2038,6 +2062,9 @@ static SQLRETURN SQL_API _SQLGetInfo(
SQLPOINTER rgbInfoValue, SQLPOINTER rgbInfoValue,
SQLSMALLINT cbInfoValueMax, SQLSMALLINT cbInfoValueMax,
SQLSMALLINT *pcbInfoValue) SQLSMALLINT *pcbInfoValue)
#ifdef HAVE_ATTRIBUTE_ALIAS
__attribute__((used));
#endif
{ {
TRACE("_SQLGetInfo"); TRACE("_SQLGetInfo");
switch (fInfoType) { switch (fInfoType) {