DPL: work around for build warnings with -Werror
authorRafal Krypa <r.krypa@samsung.com>
Wed, 18 Jun 2014 14:05:25 +0000 (16:05 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 23 Jun 2014 14:44:12 +0000 (16:44 +0200)
DPL::SqlConnection::ExecCommand() is marked as deprecated to warn it's users.
It's not deprecated, but could cause SQL Injection. This method is also
used internally for transactions.
Such combination causes build warnings. But this repository is built with
-Werror flags and it breaks the build.

Since this method is not needed outside SqlConnection, move it to private
methods and remove the warning.

Change-Id: I088f4736ecca318613b897ef05b12af4cdc1f664
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/server/dpl/db/include/dpl/db/sql_connection.h

index 18a5d3f9991b0583205c9b6f295425b45b18de2f..6bd6cf975b06a53587c24ed7f5fc3d6d89cd0065 100644 (file)
@@ -432,6 +432,14 @@ class SqlConnection
 
     static SynchronizationObject *AllocDefaultSynchronizationObject();
 
+    /**
+     * Execute SQL command without result
+     *
+     * @param format
+     * @param ...
+     */
+    void ExecCommand(const char *format, ...);
+
   public:
     /**
      * Open SQL connection
@@ -456,16 +464,6 @@ class SqlConnection
      */
     virtual ~SqlConnection();
 
-    /**
-     * Execute SQL command without result
-     *
-     * @param format
-     * @param ...
-     */
-    void ExecCommand(const char *format, ...) DPL_DEPRECATED_WITH_MESSAGE(
-            "To prevent sql injection do not use this \
-             method for direct sql execution");
-
     /**
      * Execute BEGIN; command to start new transaction
      *