From 4c2704fb2f5709a2a0c6aa0bd67932824d1d68db Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Sun, 21 Sep 2014 16:16:07 +0200 Subject: [PATCH] CComponentsForm: Fix compiler warning (-Wsign-compare) --- src/gui/components/cc_frm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index e0816833d..cd916cdc3 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -553,7 +553,7 @@ void CComponentsForm::setSelectedItem(int item_id) size_t count = v_cc_items.size(); int id = item_id; - if (id > (count-1) || id < 0 || (count == 0)){ + if (id > (int)(count-1) || id < 0 || (count == 0)){ dprintf(DEBUG_NORMAL, "[CComponentsForm] [%s - %d] invalid parameter item_id = %u, available items = %u, allowed values are: 0...%u! \n", __func__, __LINE__, item_id, @@ -567,7 +567,7 @@ void CComponentsForm::setSelectedItem(int item_id) if (id < 0) id = count-1; //jump to 1st item, if id is out of range, avoids also possible segfault - if (id > (count-1)) + if (id > (int)(count-1)) id = 0; }