From db2ecf57cc43a06412498f91764aa575fb2a806a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:45:01 +0000 Subject: [PATCH] Avoid signed/unsigned comparison warnings. Also declare the variable only used inside the loop in the loop statement itself. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/x11/clipbrd.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/x11/clipbrd.cpp b/src/x11/clipbrd.cpp index e01c1fa832..ddb2ebe6ae 100644 --- a/src/x11/clipbrd.cpp +++ b/src/x11/clipbrd.cpp @@ -263,10 +263,9 @@ void GetClipboardData(Display* disp, Window win, wxDataObject &data, wxDataForma atomVector.push_back(XA_IMAGE_TIFF); atomVector.push_back(XA_IMAGE_PNG); - int i; // check the four atoms in clipboard, try to find whether there has data // stored in one of these atom. - for ( i = 0; i < atomVector.size(); i++ ) + for ( unsigned i = 0; i < atomVector.size(); i++ ) { clipbrdData = GetClipboardDataByFormat(disp, win, XA_CLIPBOARD, @@ -353,8 +352,7 @@ extern "C" void wxClipboardHandleSelectionRequest(XEvent event) wxDataFormat dfFormat = wxDF_TEXT; #endif - int i; - for ( i = 0; i <= atomVector.size(); i++ ) + for ( unsigned i = 0; i <= atomVector.size(); i++ ) { if ( target == atomVector.at(i) ) {