Bug 33319

Summary: cairo_win32_print_gdi_error() use fwprintf with a char* format
Product: cairo Reporter: Mats Palmgren <matspal>
Component: win32 backendAssignee: cairo-bugs mailing list <cairo-bugs>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium CC: matspal
Version: 1.10.3Keywords: patch
Hardware: All   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:

Description Mats Palmgren 2011-01-20 21:33:42 UTC
cairo_win32_print_gdi_error() use fwprintf with a char* format.
It should also flush stderr so that all error messages appears before exit.

The above two problems results in no GDI errors being printed in Firefox.

See https://bugzilla.mozilla.org/show_bug.cgi?id=624198

Fixed in mozilla-central for Firefox 4:
http://hg.mozilla.org/mozilla-central/rev/ba49fff91d82
Comment 1 Andrea Canciani 2011-01-21 00:59:16 UTC
commit 47d14586f5d56b2c926a2ddbca6cfbd284c3b3f1
Author: Mats Palmgren <matspal@gmail.com>
Date:   Fri Jan 21 09:52:19 2011 +0100

    win32: Improve error logging
    
    On win32 stderr is fully buffered, so fflush() should be called after
    each error to ensure it is printed to the console.
    
    There is no need to use fwprintf if the format string can be
    represented as char*.
    
    See https://bugs.freedesktop.org/show_bug.cgi?id=33319

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.