--- a/targets/plc_debug.c Mon Oct 19 16:26:15 2009 +0200
+++ b/targets/plc_debug.c Thu Oct 22 11:26:45 2009 +0200
@@ -51,17 +51,17 @@
struct_plcvar variable_table[%(variables_pointer_type_table_count)d];
-void __init_debug()
+void __init_debug(void)
{
%(variables_pointer_type_table_initializer)s
buffer_state = BUFFER_FREE;
}
-void __cleanup_debug()
+void __cleanup_debug(void)
{
}
-void __retrieve_debug()
+void __retrieve_debug(void)
{
}
@@ -71,7 +71,7 @@
extern void InitiateDebugTransfer(void);
extern unsigned long __tick;
-void __publish_debug()
+void __publish_debug(void)
{
/* Check there is no running debugger re-configuration */
if(TryEnterDebugSection()){
@@ -143,10 +143,11 @@
latest_subscription = subscription_table;
}
-void FreeDebugData()
+void FreeDebugData(void)
{
/* atomically mark buffer as free */
- long latest_state = AtomicCompareExchange(
+ long latest_state;
+ latest_state = AtomicCompareExchange(
&buffer_state,
BUFFER_BUSY,
BUFFER_FREE);
@@ -169,8 +170,8 @@
{
return old_cursor;
}else{
- printf("%%d > %%d\n", old_cursor - debug_buffer, BUFFER_SIZE);
- return NULL;
+ //printf("%%d > %%d\n", old_cursor - debug_buffer, BUFFER_SIZE);
+ return NULL;
}
}
*idx = -1;