Fix some warnings for clang and intel compilers

This commit is contained in:
Rodrigo Arias 2021-11-08 17:05:22 +01:00
parent 73d9e323b9
commit 4fcef1c5b6
5 changed files with 10 additions and 8 deletions

6
chan.c
View File

@ -24,7 +24,7 @@
#include "utlist.h"
static void
chan_init(struct ovni_chan *chan, int track, int row, int type, FILE *prv, int64_t *clock)
chan_init(struct ovni_chan *chan, enum chan_track track, int row, int type, FILE *prv, int64_t *clock)
{
chan->n = 0;
chan->type = type;
@ -53,7 +53,7 @@ void
chan_th_init(struct ovni_ethread *th,
struct ovni_chan **update_list,
enum chan id,
int track,
enum chan_track track,
int init_st,
int enabled,
int dirty,
@ -82,7 +82,7 @@ void
chan_cpu_init(struct ovni_cpu *cpu,
struct ovni_chan **update_list,
enum chan id,
int track,
enum chan_track track,
int init_st,
int enabled,
int dirty,

4
chan.h
View File

@ -24,7 +24,7 @@ void
chan_th_init(struct ovni_ethread *th,
struct ovni_chan **update_list,
enum chan id,
int track,
enum chan_track track,
int init_st,
int enabled,
int dirty,
@ -36,7 +36,7 @@ void
chan_cpu_init(struct ovni_cpu *cpu,
struct ovni_chan **update_list,
enum chan id,
int track,
enum chan_track track,
int row,
int init_st,
int enabled,

2
emu.c
View File

@ -48,7 +48,7 @@ evclock(struct ovni_stream *stream, struct ovni_ev *ev)
static void
print_ev(struct ovni_stream *stream, struct ovni_ev *ev)
{
int64_t clock, delta;
int64_t clock, delta = 0;
int i, payloadsize;
UNUSED(delta);

View File

@ -106,7 +106,7 @@ chan_tracking_update(struct ovni_chan *chan, struct ovni_ethread *th)
/* Sets the state of the thread and updates the thread tracking channels */
static void
thread_set_state(struct ovni_ethread *th, int state)
thread_set_state(struct ovni_ethread *th, enum ethread_state state)
{
int i;
@ -521,7 +521,7 @@ static void
pre_burst(struct ovni_emu *emu)
{
struct ovni_ethread *th;
int64_t dt;
int64_t dt = 0;
UNUSED(dt);

2
ovni.c
View File

@ -300,6 +300,7 @@ ovni_thread_isready(void)
return rthread.ready;
}
#ifdef USE_RDTSC
static inline
uint64_t rdtsc(void)
{
@ -309,6 +310,7 @@ uint64_t rdtsc(void)
__asm__ volatile("rdtsc" : "=a" (lo), "=d" (hi));
return (uint64_t) hi << 32 | lo;
}
#endif
uint64_t
ovni_get_clock(void)