[aseprite] 103/134: fix "Program returns random data in a function" GCC warning

Tobias Hansen thansen at moszumanska.debian.org
Sat Mar 14 17:10:13 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit a523f686fcf37d0ae4f1729ed5ef335ffb8f3639
Author: Matthias Mailänder <Mailaender at users.noreply.github.com>
Date:   Sat Dec 20 11:39:12 2014 +0100

    fix "Program returns random data in a function" GCC warning
---
 src/raster/algofill.cpp         | 1 +
 src/raster/conversion_alleg.cpp | 1 +
 src/raster/conversion_she.cpp   | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/raster/algofill.cpp b/src/raster/algofill.cpp
index 96bbe01..c27292d 100644
--- a/src/raster/algofill.cpp
+++ b/src/raster/algofill.cpp
@@ -93,6 +93,7 @@ template<typename ImageTraits>
 static inline bool color_equal(color_t c1, color_t c2, int tolerance)
 {
   static_assert(false && sizeof(ImageTraits), "Invalid color comparison");
+  return false;
 }
 
 template<>
diff --git a/src/raster/conversion_alleg.cpp b/src/raster/conversion_alleg.cpp
index e2301d4..d1fb679 100644
--- a/src/raster/conversion_alleg.cpp
+++ b/src/raster/conversion_alleg.cpp
@@ -39,6 +39,7 @@ namespace {
 template<typename ImageTraits, int color_depth>
 int convert_color_to_allegro(color_t color, const Palette* palette) {
   static_assert(false && sizeof(ImageTraits), "Invalid color conversion");
+  return 0;
 }
 
 template<>
diff --git a/src/raster/conversion_she.cpp b/src/raster/conversion_she.cpp
index 3b95b28..d106f05 100644
--- a/src/raster/conversion_she.cpp
+++ b/src/raster/conversion_she.cpp
@@ -42,6 +42,7 @@ namespace {
 template<typename ImageTraits, she::SurfaceFormat format>
 uint32_t convert_color_to_surface(color_t color, const Palette* palette, const she::SurfaceFormatData* fd) {
   static_assert(false && sizeof(ImageTraits), "Invalid color conversion");
+  return 0;
 }
 
 template<>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list