Bug 33319 - cairo_win32_print_gdi_error() use fwprintf with a char* format
Summary: cairo_win32_print_gdi_error() use fwprintf with a char* format
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: 1.10.3
Hardware: All Windows (All)
: medium normal
Assignee: cairo-bugs mailing list
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-01-20 21:33 UTC by Mats Palmgren
Modified: 2011-01-21 00:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

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.