Hi, the null driver backend generates a warning for me on gcc-4.4.5: cc1: warnings being treated as errors /home/aniederl/work/actvsm/qemu/hw/tpm_null.c: In function ‘tpm_null_main_loop’: /home/aniederl/work/actvsm/qemu/hw/tpm_null.c:107: error: ‘in’ may be used uninitialized in this function make[1]: *** [tpm_null.o] Error 1
The attached patch fixes this. Regards, Andreas
commit a4f91be3b14c412d47a711505edf9be8816dde26 Author: Andreas Niederl <andreas.nied...@iaik.tugraz.at> Date: Fri Aug 12 14:39:48 2011 +0200 Fix uninitialized variable warning in tpm_null driver diff --git a/hw/tpm_null.c b/hw/tpm_null.c index d8d4fda..ce0b8f0 100644 --- a/hw/tpm_null.c +++ b/hw/tpm_null.c @@ -97,6 +97,7 @@ static void *tpm_null_main_loop(void *d) locty = thr_parms->tpm_state->command_locty; + in = thr_parms->tpm_state->loc[locty].w_buffer.buffer; in_len = thr_parms->tpm_state->loc[locty].w_offset; out = thr_parms->tpm_state->loc[locty].r_buffer.buffer;