Closed Bug 835635 Opened 11 years ago Closed 11 years ago

nsPrintDialogGTK.cpp:343:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Categories

(Core :: Widget: Gtk, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Build warnings in nsPrintDialogGTK.cpp:
{
widget/gtk2/nsPrintDialogGTK.cpp: In function 'void ShowCustomDialog(GtkComboBox*, gpointer)':
widget/gtk2/nsPrintDialogGTK.cpp:50:78: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
widget/gtk2/nsPrintDialogGTK.cpp: In member function 'const char* nsPrintDialogWidgetGTK::OptionWidgetToString(GtkWidget*)':
widget/gtk2/nsPrintDialogGTK.cpp:343:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
widget/gtk2/nsPrintDialogGTK.cpp:345:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}

This is because we compare 'gint' values to a macro that evaluates to ArrayLength() (which returns unsigned).

Trivial fix -- just add a gint cast to the macro.
Attached patch fixSplinter Review
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #707382 - Flags: review?(karlt)
Attachment #707382 - Flags: review?(karlt) → review+
https://hg.mozilla.org/mozilla-central/rev/6d633b6a8d43
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: