Hi Philippe, On 2020/11/19 14:16, Philippe Mathieu-Daudé wrote: > Hi Alex, > > On 11/19/20 4:01 AM, Alex Chen wrote: >> We should use printf format specifier "%u" instead of "%d" for >> argument of type "unsigned int". >> >> Reported-by: Euler Robot <euler.ro...@huawei.com> >> Signed-off-by: Alex Chen <alex.c...@huawei.com> >> --- >> hw/display/vmware_vga.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c >> index bef0d7d69a..f93bbe15c2 100644 >> --- a/hw/display/vmware_vga.c >> +++ b/hw/display/vmware_vga.c >> @@ -534,7 +534,7 @@ static inline void vmsvga_cursor_define(struct >> vmsvga_state_s *s, >> #endif >> break; >> default: >> - fprintf(stderr, "%s: unhandled bpp %d, using fallback cursor\n", >> + fprintf(stderr, "%s: unhandled bpp %u, using fallback cursor\n", >> __func__, c->bpp); > > The format fix is correct, but since you change that line, > "fprintf(stderr)" is old code, nowadays we prefer get rid of it > by using warn_report() in place (see "qemu/error-report.h"). >
Thanks for your review, since fprintf() is used elsewhere in vmware_vga.c, I will send a new patch to replace all fprintf() with warn_report() in vmware_vga.c. In addition, is there better to use error_report() instead of warn_report() here? Thanks, Alex