Hello community, here is the log from the commit of package xclass for openSUSE:Factory checked in at 2017-09-28 12:35:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xclass (Old) and /work/SRC/openSUSE:Factory/.xclass.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xclass" Thu Sep 28 12:35:02 2017 rev:20 rq:528904 version:0.9.2 Changes: -------- --- /work/SRC/openSUSE:Factory/xclass/xclass.changes 2016-07-03 12:27:58.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.xclass.new/xclass.changes 2017-09-28 12:35:23.799459077 +0200 @@ -1,0 +2,7 @@ +Mon Sep 25 15:35:26 UTC 2017 - adam.ma...@suse.de + +- update xclass-0.9.2-gcc6.patch + * Use signed arithmetic when doing a "distance" calculation + (boo#1041255) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xclass.spec ++++++ --- /var/tmp/diff_new_pack.CIBJeR/_old 2017-09-28 12:35:25.667196445 +0200 +++ /var/tmp/diff_new_pack.CIBJeR/_new 2017-09-28 12:35:25.667196445 +0200 @@ -1,7 +1,7 @@ # # spec file for package xclass # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed ++++++ xclass-0.9.2-gcc6.patch ++++++ --- /var/tmp/diff_new_pack.CIBJeR/_old 2017-09-28 12:35:25.707190821 +0200 +++ /var/tmp/diff_new_pack.CIBJeR/_new 2017-09-28 12:35:25.711190258 +0200 @@ -1,30 +1,34 @@ -Index: b/lib/libxclass/OXFrame.cc -=================================================================== ---- a/lib/libxclass/OXFrame.cc -+++ b/lib/libxclass/OXFrame.cc -@@ -23,6 +23,7 @@ - #include <X11/Xlib.h> - #include <X11/Xutil.h> - #include <sys/time.h> -+#include <cmath> - - #include <xclass/utils.h> - #include <xclass/OXClient.h> -@@ -345,8 +346,8 @@ int OXFrame::HandleEvent(XEvent *event) +bts: #1041255 +Author: i@marguerite +Summary: fix narrowing conversion from int to char inside {} + +Author: Adam Majer <ama...@suse.de> +Summary: use signed calculations when calling abs(x) + +Use signed variables when doing a "distance" calculation. +Callng abs(x) on unsinged is pointless, since all values +are always >0. But since the code actually assumes signed +arithmetic, but uses unsigned - fix the code. + +Index: xclass-0.9.2/lib/libxclass/OXFrame.cc +=================================================================== +--- xclass-0.9.2.orig/lib/libxclass/OXFrame.cc ++++ xclass-0.9.2/lib/libxclass/OXFrame.cc +@@ -345,8 +345,8 @@ int OXFrame::HandleEvent(XEvent *event) case ButtonPress: if ((event->xbutton.time - _lastclick < 350) && (event->xbutton.button == _lastbutton) && - (abs(event->xbutton.x_root - _dbx) < 3) && - (abs(event->xbutton.y_root - _dby) < 3) && -+ (std::abs(event->xbutton.x_root - _dbx) < 3) && -+ (std::abs(event->xbutton.y_root - _dby) < 3) && ++ abs(event->xbutton.x_root - (signed)_dbx) < 3 && ++ abs(event->xbutton.y_root - (signed)_dby) < 3 && (event->xbutton.window == _dbw)) ++_clickcount; else -Index: b/lib/libxclass/icons/VResizer.xbm +Index: xclass-0.9.2/lib/libxclass/icons/VResizer.xbm =================================================================== ---- a/lib/libxclass/icons/VResizer.xbm -+++ b/lib/libxclass/icons/VResizer.xbm +--- xclass-0.9.2.orig/lib/libxclass/icons/VResizer.xbm ++++ xclass-0.9.2/lib/libxclass/icons/VResizer.xbm @@ -1,6 +1,6 @@ #define VResizer_width 32 #define VResizer_height 32 @@ -33,10 +37,10 @@ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0x7f,0xfd,0xff,0xff,0x7f,0xfd,0xff,0xff,0x7f,0xfd,0xff,0xff, -Index: b/lib/libxclass/icons/VmaskResizer.xbm +Index: xclass-0.9.2/lib/libxclass/icons/VmaskResizer.xbm =================================================================== ---- a/lib/libxclass/icons/VmaskResizer.xbm -+++ b/lib/libxclass/icons/VmaskResizer.xbm +--- xclass-0.9.2.orig/lib/libxclass/icons/VmaskResizer.xbm ++++ xclass-0.9.2/lib/libxclass/icons/VmaskResizer.xbm @@ -1,6 +1,6 @@ #define VmaskResizer_width 32 #define VmaskResizer_height 32 @@ -45,11 +49,11 @@ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x80,0x03,0x00,0x00,0x80,0x03,0x00,0x00,0x80,0x03,0x00,0x00, -Index: b/lib/libxclass/OXResizer.cc +Index: xclass-0.9.2/lib/libxclass/OXResizer.cc =================================================================== ---- a/lib/libxclass/OXResizer.cc -+++ b/lib/libxclass/OXResizer.cc -@@ -55,9 +55,9 @@ OXHorizontalResizer::OXHorizontalResizer +--- xclass-0.9.2.orig/lib/libxclass/OXResizer.cc ++++ xclass-0.9.2/lib/libxclass/OXResizer.cc +@@ -56,9 +56,9 @@ OXHorizontalResizer::OXHorizontalResizer int hspotx = 16, hspoty = 16; @@ -61,7 +65,7 @@ HmaskResizer_width, HmaskResizer_height); XColor black, white; -@@ -305,9 +305,9 @@ OXVerticalResizer::OXVerticalResizer(con +@@ -306,9 +306,9 @@ OXVerticalResizer::OXVerticalResizer(con int hspotx = 16, hspoty = 16; @@ -73,10 +77,10 @@ VmaskResizer_width, VmaskResizer_height); XColor black, white; -Index: b/lib/libxclass/icons/HResizer.xbm +Index: xclass-0.9.2/lib/libxclass/icons/HResizer.xbm =================================================================== ---- a/lib/libxclass/icons/HResizer.xbm -+++ b/lib/libxclass/icons/HResizer.xbm +--- xclass-0.9.2.orig/lib/libxclass/icons/HResizer.xbm ++++ xclass-0.9.2/lib/libxclass/icons/HResizer.xbm @@ -1,6 +1,6 @@ #define HResizer_width 32 #define HResizer_height 32 @@ -85,10 +89,10 @@ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xbf, 0xfe,0xff,0xff,0xdf,0xfd,0xff,0xff,0xef,0xfb,0xff,0xff,0xf7,0xf7,0xff,0xff, -Index: b/lib/libxclass/icons/HmaskResizer.xbm +Index: xclass-0.9.2/lib/libxclass/icons/HmaskResizer.xbm =================================================================== ---- a/lib/libxclass/icons/HmaskResizer.xbm -+++ b/lib/libxclass/icons/HmaskResizer.xbm +--- xclass-0.9.2.orig/lib/libxclass/icons/HmaskResizer.xbm ++++ xclass-0.9.2/lib/libxclass/icons/HmaskResizer.xbm @@ -1,6 +1,6 @@ #define HmaskResizer_width 32 #define HmaskResizer_height 32 @@ -97,3 +101,20 @@ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0xc0, 0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00,0x00,0xf8,0x0f,0x00,0x00, +Index: xclass-0.9.2/lib/libxclass/OGifImage.cc +=================================================================== +--- xclass-0.9.2.orig/lib/libxclass/OGifImage.cc ++++ xclass-0.9.2/lib/libxclass/OGifImage.cc +@@ -973,9 +973,9 @@ void OGifImage::AllocClosestColor(int Co + + for (j = 0; j < XNumOfColors; j++) { + // Find the closest color in 3D RGB space using L1 norm. +- if ((D = abs(Red - XOldColorTable[j].red) + +- abs(Green - XOldColorTable[j].green) + +- abs(Blue - XOldColorTable[j].blue)) < Distance) { ++ if ((D = abs((long)Red - XOldColorTable[j].red) + ++ abs((long)Green - XOldColorTable[j].green) + ++ abs((long)Blue - XOldColorTable[j].blue)) < Distance) { + Distance = D; + Index = j; + }