From e80404a85f7c87d242707ba96795629ce031b692 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 11 Mar 2011 13:29:54 -0800 Subject: [PATCH] Fix 64 bit warning when using pointer as unsigned counter The logic_lpm.c file uses the nexus private data pointer as an unsigned counter. This patch makes the value unsigned long to avoid a compilation warning on 64 bit systems. --- tgt-vlog95/logic_lpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tgt-vlog95/logic_lpm.c b/tgt-vlog95/logic_lpm.c index e1a5819af..764fb93bd 100644 --- a/tgt-vlog95/logic_lpm.c +++ b/tgt-vlog95/logic_lpm.c @@ -1352,7 +1352,7 @@ void emit_signal_net_const_as_ca(ivl_scope_t scope, ivl_signal_t sig) { ivl_nexus_t nex = ivl_signal_nex(sig, 0); unsigned idx, count = ivl_nexus_ptrs(nex); - unsigned emitted = (unsigned) ivl_nexus_get_private(nex); + unsigned long emitted = (unsigned long) ivl_nexus_get_private(nex); for (idx = 0; idx < count; idx += 1) { ivl_nexus_ptr_t nex_ptr = ivl_nexus_ptr(nex, idx); ivl_net_const_t net_const = ivl_nexus_ptr_con(nex_ptr); @@ -1380,7 +1380,7 @@ void emit_signal_net_const_as_ca(ivl_scope_t scope, ivl_signal_t sig) fprintf(vlog_out, "\n"); /* Increment the emitted constant count by one. */ ivl_nexus_set_private(nex, - (void *) ((unsigned) ivl_nexus_get_private(nex) + 1U)); + (void *) ((unsigned long) ivl_nexus_get_private(nex) + 1U)); return; } /* We must find the constant in the nexus. */