[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 2/2] hw/audio/sb16.c: change dolog() to qemu_log_
Re: [Qemu-devel] [PULL 2/2] hw/audio/sb16.c: change dolog() to qemu_log_mask()
Thu, 8 Feb 2018 11:00:05 +0000
On 2 February 2018 at 07:50, Gerd Hoffmann <address@hidden> wrote:
> From: John Arbuckle <address@hidden>
> Changes all the occurrances of dolog() to qemu_log_mask().
> Signed-off-by: John Arbuckle <address@hidden>
> Message-id: address@hidden
> Signed-off-by: Gerd Hoffmann <address@hidden>
> @@ -735,9 +742,8 @@ static void complete (SB16State *s)
> case 0x42: /* FT2 sets output freq with this, go figure
> -#if 0
> - dolog ("cmd 0x42 might not do what it think it should\n");
> + qemu_log_mask(LOG_UNIMP, "cmd 0x42 might not do what it think it"
> + " should\n");
> case 0x41:
> s->freq = dsp_get_hilo (s);
> ldebug ("set freq %d\n", s->freq);
Hi. The removal of the #if 0 here means that Coverity reports a
new warning (CID 1385841) about a potential missing break.
The case 0x42 should end either with a "break;" or with a comment
"/* fall through */".
suggests that "/* fall through */" is correct, since 0x42 is 'set
input sample rate', 0x41 is 'set output sample rate', and supposedly
the two are equivalent on the hardware.
I suspect that may also mean that this log should be a LOG_GUEST_ERROR
rather than LOG_UNIMP (or perhaps not a warning at all, since we
can't tell if the guest really was trying to program the input