- Fix Warning about cast int to pointer.
intptr type is used because there are only ID value that casted in pointer.
Store an ID on integer make sense, and cast is used only to permits a call function.
- Remove warning around variable set but not used.
# pass macro defition to source files
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
ADD_DEFINITIONS("-DPLUGINDIR=\"${PLUGINDIR}\"")
-
+ADD_DEFINITIONS("-Wno-unused-but-set-variable")
# log tag integration
ADD_DEFINITIONS("-DCOMPONENT_TAG=SYSTEM")
ADD_DEFINITIONS("-DSYNC_AGENT_LOG")
#include <assert.h>
#include "utility/sync_util.h"
#include "engine-controller/queuing_rule_spec_pool.h"
-
+#include <stdint.h>
#ifndef SYNC_AGENT_LOG
#undef LOG_TAG
#define LOG_TAG "AF_EC"
}
}
- g_hash_table_insert(pool->queuing_rule_spec_hash, (gpointer) new_id, spec);
+ g_hash_table_insert(pool->queuing_rule_spec_hash, (gpointer) ((intptr_t)new_id), spec);
*queuing_rule_id = new_id;
retvm_if(pool == NULL, NULL, "ec_queuing_rule_spec_pool_t is NULL !!");
- sync_agent_ec_queuing_rule_spec_s *queuing_rule_spec = g_hash_table_lookup(pool->queuing_rule_spec_hash, (gconstpointer) queuing_rule_id);
+ sync_agent_ec_queuing_rule_spec_s *queuing_rule_spec = g_hash_table_lookup(pool->queuing_rule_spec_hash, (gconstpointer) ((intptr_t)queuing_rule_id));
_EXTERN_FUNC_EXIT;
#include "engine-controller/task_spec_internal.h"
#include "engine-controller/param_spec_internal.h"
#include "engine-controller/param_value_internal.h"
-
+#include <stdint.h>
#ifndef SYNC_AGENT_LOG
#undef LOG_TAG
#define LOG_TAG "AF_EC"
/* get to node list from child_index */
/* note that to nodes_list containing sync_agent_ec_int */
- GList *to_node_list = ec_graph_edge_pool_query_to_node_list(control_edge_pool, (sync_agent_ec_constpointer) from_child_task_index);
+ GList *to_node_list = ec_graph_edge_pool_query_to_node_list(control_edge_pool, (sync_agent_ec_constpointer) ((intptr_t)from_child_task_index));
/* remove control flow from child task at child_index of parent task */
GList *iter = NULL;
sync_agent_ec_int to_child_task_index = 0;
ec_task_t *to_child_task = NULL;
for (iter = to_node_list; iter != NULL; iter = g_list_next(iter)) {
- to_child_task_index = (sync_agent_ec_int) (iter->data);
+ to_child_task_index = (sync_agent_ec_int) ((intptr_t)(iter->data));
ec_task_remove_control_flow(parent_task, from_child_task_index, to_child_task_index);
/* if zero in-degree of control flow detected, make child task and append runnable_child_task_list */
#include "engine-controller/task_info_pool.h"
#include "engine-controller/queuing_rule_spec.h"
#include "engine-controller/task_spec_internal.h"
-
+#include <stdint.h>
#ifndef SYNC_AGENT_LOG
#undef LOG_TAG
#define LOG_TAG "AF_EC"
GHashTable *hash = task_info_pool->task_info_pool;
if (replace) {
- g_hash_table_replace(hash, (gpointer) (task_info->task_spec_id), task_info); /* TODO : check free well done */
+ g_hash_table_replace(hash, (gpointer) ((intptr_t)(task_info->task_spec_id)), task_info); /* TODO : check free well done */
success = true;
} else {
- gpointer tmp = g_hash_table_lookup(hash, (gpointer) (task_info->task_spec_id));
+ gpointer tmp = g_hash_table_lookup(hash, (gpointer) ((intptr_t)(task_info->task_spec_id)));
if (tmp != NULL) {
success = false;
} else {
- g_hash_table_insert(hash, (gpointer) (task_info->task_spec_id), task_info);
+ g_hash_table_insert(hash, (gpointer) ((intptr_t)(task_info->task_spec_id)), task_info);
}
}
GHashTable *hash = task_info_pool->task_info_pool;
ec_task_info_t *task_info = NULL;
- task_info = (ec_task_info_t *) g_hash_table_lookup(hash, (gpointer) msg_type);
+ task_info = (ec_task_info_t *) g_hash_table_lookup(hash, (gpointer) ((intptr_t)msg_type));
_EXTERN_FUNC_EXIT;
#include <stdlib.h>
#include "utility/sync_util.h"
#include "engine-controller/task_pool.h"
-
+#include <stdint.h>
#ifndef SYNC_AGENT_LOG
#undef LOG_TAG
#define LOG_TAG "AF_EC"
retm_if(task_pool == NULL, "ec_task_pool_t is NULL !!");
- g_hash_table_insert(task_pool->task_hash, (gpointer) request_id, (gpointer) ec_task_ref_task(task));
+ g_hash_table_insert(task_pool->task_hash, (gpointer) ((intptr_t)(request_id)), (gpointer) ec_task_ref_task(task));
_EXTERN_FUNC_EXIT;
}
retvm_if(task_pool == NULL, NULL, "ec_task_pool_t is NULL !!");
GHashTable *task_hash = task_pool->task_hash;
- ec_task_t *task = (ec_task_t *) g_hash_table_lookup(task_hash, (gconstpointer) request_id);
+ ec_task_t *task = (ec_task_t *) g_hash_table_lookup(task_hash, (gconstpointer) ((intptr_t)request_id));
if (task != NULL) {
_EXTERN_FUNC_EXIT;
retm_if(task_pool == NULL, "ec_task_pool_t is NULL !!");
GHashTable *task_hash = task_pool->task_hash;
- ec_task_t *task = (ec_task_t *) g_hash_table_lookup(task_hash, (gconstpointer) request_id);
+ ec_task_t *task = (ec_task_t *) g_hash_table_lookup(task_hash, (gconstpointer) ((intptr_t)request_id));
if (task != NULL) {
ec_task_unref_task(task);
- g_hash_table_remove(task_hash, (gconstpointer) request_id);
+ g_hash_table_remove(task_hash, (gconstpointer) ((intptr_t)request_id));
}
_EXTERN_FUNC_EXIT;
#include "engine-controller/task_spec.h"
#include "engine-controller/task_spec_internal.h"
#include "engine-controller/param_spec_internal.h"
-
+#include <stdint.h>
#ifndef EXPORT_API
#define EXPORT_API __attribute__ ((visibility("default")))
#endif
sync_agent_ec_uint *control_flow_in_degree_array = child_task_info->child_task_control_flow_in_degree;
/* add edge and in_degree count */
- if (ec_graph_edge_pool_add_edge(control_edge_pool, (sync_agent_ec_constpointer) from_task_index, (sync_agent_ec_constpointer) to_task_index)) {
+ if (ec_graph_edge_pool_add_edge(control_edge_pool, (sync_agent_ec_constpointer) ((intptr_t)from_task_index), (sync_agent_ec_constpointer) ((intptr_t)to_task_index))) {
control_flow_in_degree_array[to_task_index]++;
}
sync_agent_ec_uint *control_flow_in_degree_array = child_task_info->child_task_control_flow_in_degree;
/* add edge and in_degree count */
- if (ec_graph_edge_pool_add_edge(control_edge_pool, (sync_agent_ec_constpointer) from_task_index, (sync_agent_ec_constpointer) to_task_index)) {
+ if (ec_graph_edge_pool_add_edge(control_edge_pool, (sync_agent_ec_constpointer) ((intptr_t)from_task_index), (sync_agent_ec_constpointer) ((intptr_t)to_task_index))) {
control_flow_in_degree_array[to_task_index]++;
}
#include <pthread.h>
#include <calendar2.h>
#include <account.h>
-
+#include <stdint.h>
#include "extern_info.h"
#include "item_change_info.h"
#include "ext_datastore_info_calendar.h"
case CALENDAR_FIELD_TIMEZONE:
switch (child_field_name) {
case CALENDAR_CHILD_FIELD_BIAS:
- *num_val1 = (int)VAL_TZ_BIAS;
+ *num_val1 = (intptr_t)VAL_TZ_BIAS;
_EXTERN_FUNC_EXIT;
return 1;
case CALENDAR_CHILD_FIELD_DAYLIGHT:
- *num_val1 = (int)VAL_TZ_DAYLIGHT;
+ *num_val1 = (intptr_t)VAL_TZ_DAYLIGHT;
_EXTERN_FUNC_EXIT;
return 1;
case CALENDAR_CHILD_FIELD_DAYLIGHT_BIAS:
- *num_val1 = (int)VAL_TZ_DAYLIGHT_BIAS;
+ *num_val1 = (intptr_t)VAL_TZ_DAYLIGHT_BIAS;
_EXTERN_FUNC_EXIT;
return 1;
case CALENDAR_CHILD_FIELD_DAYLIGHT_BEGIN:
#include <pthread.h>
#include <calendar2.h>
#include <account.h>
-
+#include <stdint.h>
#include "extern_info.h"
#include "item_change_info.h"
#include "ext_datastore_info_task.h"
case CALENDAR_FIELD_TIMEZONE:
switch (child_field_name) {
case CALENDAR_CHILD_FIELD_BIAS:
- *num_val1 = (int)VAL_TZ_BIAS;
+ *num_val1 = (intptr_t)VAL_TZ_BIAS;
_EXTERN_FUNC_EXIT;
return 1;
case CALENDAR_CHILD_FIELD_DAYLIGHT:
- *num_val1 = (int)VAL_TZ_DAYLIGHT;
+ *num_val1 = (intptr_t)VAL_TZ_DAYLIGHT;
_EXTERN_FUNC_EXIT;
return 1;
case CALENDAR_CHILD_FIELD_DAYLIGHT_BIAS:
- *num_val1 = (int)VAL_TZ_DAYLIGHT_BIAS;
+ *num_val1 = (intptr_t)VAL_TZ_DAYLIGHT_BIAS;
_EXTERN_FUNC_EXIT;
return 1;
case CALENDAR_CHILD_FIELD_DAYLIGHT_BEGIN: