Package: src:csmash Version: 0.6.6-6.7 Tags: patch Usertags: origin-ubuntu ubuntu-patch xenial
In Ubuntu, we've applied the attached patch to achieve the following: * debian/patches/missing-format-arguments.patch: - Fix missing format arguments. Fixing FTBFS. loadparts.cpp: In static member function 'static bool parts::loadobjects(const char*)': loadparts.cpp:221:17: warning: format not a string literal and no format arguments [-Wformat-security] printf(e.what()); ^ loadparts.cpp: In static member function 'static bool parts::loadfile(const char*)': loadparts.cpp:251:60: error: no matching function for call to 'clamp(unsigned int, long unsigned int, long unsigned int)' int bufsize = clamp(0U, sizeof(line)-l, sizeof(line)-1); ^ loadparts.cpp:251:60: note: candidate is: loadparts.cpp:73:17: note: template<class T> const T& {anonymous}::clamp(const T&, const T&, const T&) inline const T& clamp(const T& a, const T& x, const T& b) { ^ loadparts.cpp:73:17: note: template argument deduction/substitution failed: loadparts.cpp:251:60: note: deduced conflicting types for parameter 'const T' ('unsigned int' and 'long unsigned int') int bufsize = clamp(0U, sizeof(line)-l, sizeof(line)-1); ^ loadparts.cpp: In member function 'virtual bool texture_parts::realize()': loadparts.cpp:541:12: warning: format not a string literal and no format arguments [-Wformat-security] printf(buf); ^ loadparts.cpp: In member function 'void polyhedron_parts::render() const': loadparts.cpp:578:11: warning: unused variable 'NanTheBLACK' [-Wunused-variable] float NanTheBLACK[4] = { 0, 0, 0, 1 }; ^ loadparts.cpp:579:11: warning: unused variable 'ManOfVirtue' [-Wunused-variable] float ManOfVirtue[4] = { 1, 1, 1, 1 }; ^ make[3]: *** [loadparts.o] Error 1 make[3]: Leaving directory `/build/buildd/csmash-0.6.6' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/build/buildd/csmash-0.6.6' make[1]: *** [all] Error 2 make[1]: Leaving directory `/build/buildd/csmash-0.6.6' make: *** [build-stamp] Error 2 We thought you might be interested in doing the same.
Description: Fix missing format arguments, resolving FTBFS. Author: Daniel T Chen <crim...@ubuntu.com> Index: csmash-0.6.6/loadparts.cpp =================================================================== --- csmash-0.6.6.orig/loadparts.cpp 2014-04-02 09:00:08.000000000 -0400 +++ csmash-0.6.6/loadparts.cpp 2014-04-02 09:04:11.568523265 -0400 @@ -218,7 +218,7 @@ } catch (const error &e) { printf("loadfile failed\n"); - printf(e.what()); + printf("%s", e.what()); return false; } return true; @@ -538,7 +538,7 @@ char buf[256]; snprintf(buf, sizeof(buf), "texture %s cannot be realized\n", filename.c_str()); - printf(buf); + printf("%s", buf); throw error(buf); return false; } else {