[dss-commits] digitalSTROM Server branch, master, updated. e3155e1761968ab9e11462bfd3a96d92b458f0a7

git version control dss-commits at forum.digitalstrom.org
Mon Jan 4 11:58:45 CET 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "digitalSTROM Server".

The branch, master has been updated
       via  e3155e1761968ab9e11462bfd3a96d92b458f0a7 (commit)
       via  c6c2a3cb14c8b6ba3fa246cd6b902ecbfd658b91 (commit)
       via  a80be754049891284c4a08f4f8fb5635d8749e12 (commit)
      from  3af125e4b69fba9346d85be13f15d0daf29ff287 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e3155e1761968ab9e11462bfd3a96d92b458f0a7
Author: Patrick Stählin <pstaehlin at futurelab.ch>
Date:   Mon Jan 4 11:56:29 2010 +0100

    Fixed compiler warnings of gcc 4.1.2

commit c6c2a3cb14c8b6ba3fa246cd6b902ecbfd658b91
Author: Patrick Stählin <pstaehlin at futurelab.ch>
Date:   Mon Jan 4 11:47:07 2010 +0100

    Fixed compilation with spidermonkey 1.7.0

commit a80be754049891284c4a08f4f8fb5635d8749e12
Author: Patrick Stählin <pstaehlin at futurelab.ch>
Date:   Mon Jan 4 11:40:40 2010 +0100

    Added newline to the end of the file

-----------------------------------------------------------------------

Changes:
diff --git a/core/DS485Interface.h b/core/DS485Interface.h
index 67db413..c200c39 100644
--- a/core/DS485Interface.h
+++ b/core/DS485Interface.h
@@ -46,6 +46,8 @@ namespace dss {
 
     virtual void setValueDevice(const Device& _device, const uint16_t _value, const uint16_t _parameterID, const int _size) = 0;
     virtual int getSensorValue(const Device& _device, const int _sensorID) = 0;
+
+    virtual ~DeviceBusInterface() {}; // please the compiler (virtual dtor)
   }; // DeviceBusInterface
 
   class StructureQueryBusInterface {
@@ -85,6 +87,8 @@ namespace dss {
 
     virtual uint16_t deviceGetFunctionID(devid_t _id, uint8_t _modulatorID) = 0;
     virtual bool getEnergyBorder(const int _modulatorID, int& _lower, int& _upper) = 0;
+
+    virtual ~StructureQueryBusInterface() {}; // please the compiler (virtual dtor)
   }; // StructureQueryBusInterface
   
   /** Interface to be implemented by any implementation of the DS485 interface */
diff --git a/core/busrequestdispatcher.h b/core/busrequestdispatcher.h
index 538b353..081f7c5 100644
--- a/core/busrequestdispatcher.h
+++ b/core/busrequestdispatcher.h
@@ -29,6 +29,7 @@ namespace dss {
   class BusRequestDispatcher {
   public:
     virtual void dispatchRequest(boost::shared_ptr<BusRequest> _pRequest) = 0;
+    virtual ~BusRequestDispatcher() {}; // please the compiler (virtual dtor)
   }; // BusRequestDispatcher
 
 } // namespace dss
diff --git a/core/jshandler.h b/core/jshandler.h
index ce22ac0..c89f710 100644
--- a/core/jshandler.h
+++ b/core/jshandler.h
@@ -91,7 +91,6 @@ namespace dss {
     bool m_KeepContext;
     std::vector<ScriptContextAttachedObject*> m_AttachedObjects;
     static void jsErrorHandler(JSContext *ctx, const char *msg, JSErrorReport *er);
-    jsval doEvaluateScript(const std::string& _fileName);
   public:
     ScriptContext(ScriptEnvironment& _env, JSContext* _pContext);
     virtual ~ScriptContext();
@@ -105,6 +104,8 @@ namespace dss {
     /** Evaluates the given file */
     template <class t>
     t evaluateScript(const std::string& _fileName);
+    // FIXME: Workaround a compiler issue that interprets typeof jsval == typeof int
+    jsval doEvaluateScript(const std::string& _fileName);
 
     /** Returns a pointer to the JSContext */
     JSContext* getJSContext() { return m_pContext; }
diff --git a/core/model/addressablemodelitem.cpp b/core/model/addressablemodelitem.cpp
index 1a97a41..aa949fb 100644
--- a/core/model/addressablemodelitem.cpp
+++ b/core/model/addressablemodelitem.cpp
@@ -67,7 +67,7 @@ namespace dss {
   void AddressableModelItem::setValue(const double _value) {
     boost::shared_ptr<SetValueCommandBusRequest> request(new SetValueCommandBusRequest());
     request->setTarget(this);
-    request->setValue(_value);
+    request->setValue(int(_value));
     m_pApartment->dispatchRequest(request);
   } // setValue
 
diff --git a/core/model/busrequest.cpp b/core/model/busrequest.cpp
index 05968f2..8061c4d 100644
--- a/core/model/busrequest.cpp
+++ b/core/model/busrequest.cpp
@@ -283,4 +283,4 @@ namespace dss {
     return result;
   } // getBuilderHints
   
-} // namespace dss
\ No newline at end of file
+} // namespace dss
diff --git a/core/model/busrequest.h b/core/model/busrequest.h
index 5ba8e57..bcb4121 100644
--- a/core/model/busrequest.h
+++ b/core/model/busrequest.h
@@ -36,11 +36,14 @@ namespace dss {
     virtual bool isBroadcast() = 0;
     virtual int getNumberOfParameter() = 0;
     virtual uint16_t getParameter(int _parameter) = 0;
+
+    virtual ~PacketBuilderHintsBase() {}; // please the compiler (virtual dtor)
   };
 
   class BusRequest {
   public:
     virtual PacketBuilderHintsBase* getBuilderHints() = 0;
+    virtual ~BusRequest() {}; // please the compiler (virtual dtor)
   };
 
   class CommandBusRequest : public BusRequest {
diff --git a/core/model/modeltypes.h b/core/model/modeltypes.h
index 2f7ffd4..01bb79d 100644
--- a/core/model/modeltypes.h
+++ b/core/model/modeltypes.h
@@ -36,4 +36,4 @@ namespace dss {
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/core/model/physicalmodelitem.h b/core/model/physicalmodelitem.h
index 66d0083..8d6171a 100644
--- a/core/model/physicalmodelitem.h
+++ b/core/model/physicalmodelitem.h
@@ -32,6 +32,8 @@ namespace dss {
     : m_IsPresent(false)
     { }
 
+    virtual ~PhysicalModelItem() {}; // please the compiler (virtual dtor)
+
     bool isPresent() const { return m_IsPresent; }
     virtual void setIsPresent(const bool _value) { m_IsPresent = _value; }
   };
diff --git a/core/sim/dsid_js.cpp b/core/sim/dsid_js.cpp
index b003f23..ce71916 100644
--- a/core/sim/dsid_js.cpp
+++ b/core/sim/dsid_js.cpp
@@ -41,7 +41,7 @@ namespace dss {
 
     virtual void initialize() {
       try {
-        jsval res = m_pContext->evaluateScript<jsval>(m_FileName);
+        jsval res = m_pContext->doEvaluateScript(m_FileName);
         if(JSVAL_IS_OBJECT(res)) {
           m_pJSThis = JSVAL_TO_OBJECT(res);
           m_pSelf.reset(new ScriptObject(m_pJSThis, *m_pContext));
diff --git a/core/web/restful.h b/core/web/restful.h
index 9f5b149..a668bdd 100644
--- a/core/web/restful.h
+++ b/core/web/restful.h
@@ -212,11 +212,12 @@ namespace dss {
     } // getMethod
 
     const std::string& getParameter(const std::string& _name) const {
+      static const std::string& kEmptyString = "";
       HashMapConstStringString::const_iterator iEntry = m_Parameter.find(_name);
       if(iEntry != m_Parameter.end()) {
         return iEntry->second;
       } else {
-        return "";
+        return kEmptyString;
       }
     } // getParameter
   private:
@@ -236,6 +237,7 @@ namespace dss {
   class RestfulRequestHandler {
   public:
     virtual std::string handleRequest(const RestfulRequest& _request, Session* _session) = 0;
+    virtual ~RestfulRequestHandler() {}; // please the compiler (virtual dtor)
   };
 
 } // namespace dss
diff --git a/tests/basetests.cpp b/tests/basetests.cpp
index 106f610..10cff28 100644
--- a/tests/basetests.cpp
+++ b/tests/basetests.cpp
@@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(testStrToIntDef) {
 } // testStrToIntDef
 
 BOOST_AUTO_TEST_CASE(testStrToUInt) {
-  BOOST_CHECK_EQUAL(7, strToUInt("7"));
+  BOOST_CHECK_EQUAL(7, int(strToUInt("7")));
 
   BOOST_CHECK_THROW(strToUInt("asdf"), std::invalid_argument);
   BOOST_CHECK_THROW(strToUInt(""), std::invalid_argument);


hooks/post-receive
-- 
digitalSTROM Server


More information about the dss-commits mailing list