[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [digikam] core/libs/dimg/filters/decorate: fix clang warnings
From:       Gilles Caulier <null () kde ! org>
Date:       2018-09-27 5:39:23
Message-ID: E1g5P1H-00044C-Ao () code ! kde ! org
[Download RAW message or body]

Git commit e208c6f760bba3bb4cdc3198e685e73aa0450054 by Gilles Caulier.
Committed on 27/09/2018 at 05:39.
Pushed by cgilles into branch 'master'.

fix clang warnings

M  +6    -4    core/libs/dimg/filters/decorate/texturefilter.cpp
M  +3    -1    core/libs/dimg/filters/decorate/texturefilter.h

https://commits.kde.org/digikam/e208c6f760bba3bb4cdc3198e685e73aa0450054

diff --git a/core/libs/dimg/filters/decorate/texturefilter.cpp \
b/core/libs/dimg/filters/decorate/texturefilter.cpp index 855994ef64..1edf828b4b \
                100644
--- a/core/libs/dimg/filters/decorate/texturefilter.cpp
+++ b/core/libs/dimg/filters/decorate/texturefilter.cpp
@@ -131,14 +131,16 @@ void TextureFilter::filterImage()
 
     // Make textured transparent layout.
 
-    for (int x = 0; runningFlag() && x < w; ++x)
+    for (int x = 0 ; runningFlag() && x < w ; ++x)
     {
-        for (int y = 0; runningFlag() && y < h; ++y)
+        for (int y = 0 ; runningFlag() && y < h ; ++y)
         {
             offset = x * bytesDepth + (y * w * bytesDepth);
             ptr    = data + offset;
             tptr   = pTeData + offset;
 
+            (void)ptr; // Remove clang warnings.
+
             // Read color
             teData.setColor(tptr, sixteenBit);
 
@@ -172,9 +174,9 @@ void TextureFilter::filterImage()
 
     // Merge layout and image using overlay method.
 
-    for (int x = 0; runningFlag() && x < w; ++x)
+    for (int x = 0 ; runningFlag() && x < w ; ++x)
     {
-        for (int y = 0; runningFlag() && y < h; ++y)
+        for (int y = 0 ; runningFlag() && y < h ; ++y)
         {
             offset = x * bytesDepth + (y * w * bytesDepth);
             ptr    = data + offset;
diff --git a/core/libs/dimg/filters/decorate/texturefilter.h \
b/core/libs/dimg/filters/decorate/texturefilter.h index ed26949e3b..958ce4a8fe 100644
--- a/core/libs/dimg/filters/decorate/texturefilter.h
+++ b/core/libs/dimg/filters/decorate/texturefilter.h
@@ -44,7 +44,9 @@ class DIGIKAM_EXPORT TextureFilter : public DImgThreadedFilter
 public:
 
     explicit TextureFilter(QObject* const parent = 0);
-    explicit TextureFilter(DImg* const orgImage, QObject* const parent=0, int \
blendGain=200, +    explicit TextureFilter(DImg* const orgImage,
+                           QObject* const parent=0,
+                           int blendGain=200,
                            const QString& texturePath=QString());
 
     ~TextureFilter();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic