fix some compiler warnings

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2016-10-22 17:11:32 +00:00
parent 4e7f9ab523
commit 207f0edddc
3 changed files with 4 additions and 9 deletions

View file

@ -1699,10 +1699,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
GtkRange *range = (GtkRange*)(horizontal ? gtkHScrollBar : gtkVScrollBar);
GtkAdjustment *adjustment = 0;
if (gtk_adjustment_configure)
adjustment = gtk_range_get_adjustment(range);
GtkAdjustment *adjustment = gtk_range_get_adjustment(range);
if (adjustment) {
gtk_adjustment_configure(adjustment, fakePos, 0, maximum, 0, 0, 0);
} else {
@ -1987,9 +1984,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
if ((option->subControls & SC_SliderGroove) && groove.isValid()) {
GtkRange *range = (GtkRange*)scaleWidget;
GtkAdjustment *adjustment = 0;
if (gtk_adjustment_configure)
adjustment = gtk_range_get_adjustment(range);
GtkAdjustment *adjustment = gtk_range_get_adjustment(range);
if (adjustment) {
gtk_adjustment_configure(adjustment,
slider->sliderPosition,

View file

@ -1320,7 +1320,7 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar*
stream >> cnt;
QToolBarAreaLayoutInfo &dock = docks[pos];
const bool applyingLayout = !testing && !pos == QInternal::TopDock;
const bool applyingLayout = !testing && pos != QInternal::TopDock;
QToolBarAreaLayoutLine line(dock.o);
for (int k = 0; k < cnt; ++k) {

View file

@ -287,7 +287,7 @@ QString QHostInfo::localDomainName()
// using thread-safe version
res_state state = static_cast<res_state>(malloc(sizeof(res_state)));
Q_CHECK_PTR(state);
memset(state, 0, sizeof(state));
memset(state, 0, sizeof(res_state));
res_ninit(state);
QString domainName = QUrl::fromAce(state->defdname);
if (domainName.isEmpty())