[PPL-devel] [GIT] ppl/ppl(master): Avoided non-constant pointers to function.

Roberto Bagnara bagnara at cs.unipr.it
Mon Aug 20 16:52:52 CEST 2012


Module: ppl/ppl
Branch: master
Commit: eb5a736c101e176993d889f24a563bb3ff8ccd1e
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=eb5a736c101e176993d889f24a563bb3ff8ccd1e

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Mon Aug 20 16:27:50 2012 +0200

Avoided non-constant pointers to function.
Detected by ECLAIR service funpntr.

---

 src/Handler_defs.hh    |    4 ++--
 src/Handler_inlines.hh |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Handler_defs.hh b/src/Handler_defs.hh
index 6c5938e..eb4f09e 100644
--- a/src/Handler_defs.hh
+++ b/src/Handler_defs.hh
@@ -81,14 +81,14 @@ class Parma_Polyhedra_Library::Implementation::Watchdog::Handler_Function
   : public Handler {
 public:
   //! Constructor with a given function.
-  Handler_Function(void (*function)());
+  Handler_Function(void (* const function)());
 
   //! Does its job: calls the embedded function.
   virtual void act() const;
 
 private:
   //! Pointer to the embedded function.
-  void (*f)();
+  void (* const f)();
 };
 
 #include "Handler_inlines.hh"
diff --git a/src/Handler_inlines.hh b/src/Handler_inlines.hh
index fd930bf..0af187f 100644
--- a/src/Handler_inlines.hh
+++ b/src/Handler_inlines.hh
@@ -48,7 +48,7 @@ Handler_Flag<Flag_Base, Flag>::act() const {
 }
 
 inline
-Handler_Function::Handler_Function(void (*function)())
+Handler_Function::Handler_Function(void (* const function)())
   : f(function) {
 }
 




More information about the PPL-devel mailing list