Cleanup some compiler warnings under CentOS 5.5
This patch cleans up a couple of warnings when compiling on CentOS 5.5 using gcc 4.1.2.
This commit is contained in:
parent
a436f7f794
commit
30fa8f64fa
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __event_H
|
||||
#define __event_H
|
||||
/*
|
||||
* Copyright (c) 2004-2009 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2004-2010 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -122,6 +122,7 @@ struct waitable_hooks_s {
|
|||
|
||||
public:
|
||||
waitable_hooks_s() : event_ctls(0) { last = &event_ctls; }
|
||||
virtual ~waitable_hooks_s() {}
|
||||
|
||||
virtual vthread_t add_waiting_thread(vthread_t thread) = 0;
|
||||
|
||||
|
|
@ -138,7 +139,7 @@ struct waitable_hooks_s {
|
|||
* needed is the list of threads waiting on that instance.
|
||||
*/
|
||||
struct waitable_state_s {
|
||||
waitable_state_s() : threads(0) { }
|
||||
waitable_state_s() : threads(0) {}
|
||||
|
||||
vthread_t threads;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -52,7 +52,10 @@ ufunc_core::ufunc_core(unsigned owid, vvp_net_t*ptr,
|
|||
|
||||
functor_ref_lookup(&result_, result_label);
|
||||
|
||||
compile_vpi_lookup((vpiHandle*)(&func_scope_), scope_label);
|
||||
/* A __vpiScope starts with a __vpiHandle structure so this is
|
||||
a safe cast. We need the (void*) to avoid a dereferenced
|
||||
type punned pointer warning from some gcc compilers. */
|
||||
compile_vpi_lookup((vpiHandle*)(void*)(&func_scope_), scope_label);
|
||||
}
|
||||
|
||||
ufunc_core::~ufunc_core()
|
||||
|
|
|
|||
|
|
@ -484,7 +484,10 @@ compile_scope_decl(char*label, char*type, char*name, char*tname,
|
|||
|
||||
void compile_scope_recall(char*symbol)
|
||||
{
|
||||
compile_vpi_lookup((vpiHandle*)¤t_scope, symbol);
|
||||
/* A __vpiScope starts with a __vpiHandle structure so this is
|
||||
a safe cast. We need the (void*) to avoid a dereferenced
|
||||
type punned pointer warning from some gcc compilers. */
|
||||
compile_vpi_lookup((vpiHandle*)(void*)¤t_scope, symbol);
|
||||
assert(current_scope);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue