[niepce] Use format attributes and enforce them.



commit eed603f04300b13feccdeac80c7bc75023063221
Author: Hubert Figuiere <hub figuiere net>
Date:   Thu May 21 17:41:18 2009 -0400

    Use format attributes and enforce them.
---
 ChangeLog                             |    4 ++++
 src/fwk/base/debug.hpp                |    6 ++++--
 src/niepce/ui/selectioncontroller.cpp |    4 ++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6536017..afe983e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-21  Hubert Figuiere  <hub figuiere net>
+
+	* Use format attributes and enforce them.
+
 2009-05-18  Hubert Figuiere  <hub figuiere net>
 
 	* Rename LibraryMainViewController -> ModuleShell
diff --git a/src/fwk/base/debug.hpp b/src/fwk/base/debug.hpp
index b622c50..31971b1 100644
--- a/src/fwk/base/debug.hpp
+++ b/src/fwk/base/debug.hpp
@@ -53,7 +53,8 @@ namespace fwk {
 	 * @param fmt the formt string, printf style
 	 * @param func the func name
 	 */
-	void dbg_print(const char* fmt, const char* func, ...);
+	void dbg_print(const char* fmt, const char* func, ...)
+    __attribute__ ((format (printf, 1, 3)));
 
 	/** assert 
 	 * @param condvalue the value of the assert, true, assert
@@ -70,7 +71,8 @@ namespace fwk {
 	 * @param fmt the formt string, printf style
 	 * @param func the func name
 	 */
-	void err_print(const char *fmt, const char* func, ...);
+	void err_print(const char *fmt, const char* func, ...)
+    __attribute__ ((format (printf, 1, 3)));
 
 }
 
diff --git a/src/niepce/ui/selectioncontroller.cpp b/src/niepce/ui/selectioncontroller.cpp
index 062456c..3169a1d 100644
--- a/src/niepce/ui/selectioncontroller.cpp
+++ b/src/niepce/ui/selectioncontroller.cpp
@@ -49,7 +49,7 @@ void SelectionController::_added()
 
 void SelectionController::add_selectable(IImageSelectable * selectable)
 { 
-    DBG_OUT("added %lx", selectable);
+    DBG_OUT("added %p", (void*)selectable);
     m_selectables.push_back(selectable);
     selectable->image_list()->signal_selection_changed().connect(
         sigc::bind(sigc::mem_fun(*this, &SelectionController::selected),
@@ -72,7 +72,7 @@ void SelectionController::activated(const Gtk::TreeModel::Path & /*path*/,
 void SelectionController::selected(IImageSelectable * selectable)
 {
 	if(m_in_handler) {
-		DBG_OUT("%lx already in handler", this);
+		DBG_OUT("%p already in handler", (void*)this);
 		return;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]