Or just add -Wno-unused-but-set-variable and keep -Werror.


On Thu, Jul 25, 2013 at 6:53 PM, Guanglin Xu <notifications@github.com>wrote:

> In tools/performance/Makefile:
>
> > @@ -1,7 +1,7 @@
> >  CC       = gcc
> >
> >  CFLAGS   += -Wall
> > -CFLAGS   += -Werror
> > +CFLAGS   += #-Werror
>
> Yes, it's better to fix the issue.
>
> option 1: would you like me to define paddr as a static global variable to
> fix this issue?
>
> option 2: define a static global dummy variable and another dummy function
> to consume paddr.
> static addr_t dummy; // global variable inside a file scope
> void consume_variable(addr_t tmp) { dummy = tmp }
>
> gettimeofday(&ktv_start, 0);
> paddr = vmi_translate_kv2p(vmi, vaddr);
> consume_variable(paddr);
> gettimeofday(&ktv_end, 0);
>
> which one do you prefer?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/bdpayne/libvmi/pull/87/files#r5403084>
> .
>