From 264cf5c509c54900d007a33a7e258c95e2ef4211 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Apr 2005 18:38:34 +0100 Subject: [PATCH] C99 Portability fix --- sql/sql_insert.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index fab6ae544fc..a38138ca5fd 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -103,7 +103,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list, return -1; } #endif - (int) table->timestamp_field_type&= ~ (int) TIMESTAMP_AUTO_SET_ON_INSERT; + *(int*)&table->timestamp_field_type&= ~ (int) TIMESTAMP_AUTO_SET_ON_INSERT; } else { // Part field list @@ -150,7 +150,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list, } if (table->timestamp_field && // Don't set timestamp if used table->timestamp_field->query_id == thd->query_id) - (int) table->timestamp_field_type&= ~ (int) TIMESTAMP_AUTO_SET_ON_INSERT; + *(int*)&table->timestamp_field_type&= ~ (int) TIMESTAMP_AUTO_SET_ON_INSERT; } // For the values we need select_priv #ifndef NO_EMBEDDED_ACCESS_CHECKS @@ -216,7 +216,7 @@ static int check_update_fields(THD *thd, TABLE_LIST *insert_table_list, { /* Don't set timestamp column if this is modified. */ if (table->timestamp_field->query_id == thd->query_id) - (int) table->timestamp_field_type&= ~ (int) TIMESTAMP_AUTO_SET_ON_UPDATE; + *(int*)&table->timestamp_field_type&= ~ (int) TIMESTAMP_AUTO_SET_ON_UPDATE; else table->timestamp_field->query_id= timestamp_query_id; }