DPL: work around for build warnings with -Werror 64/23164/4
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 18:03:48 +0000 (20:03 +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 18a5d3f..6bd6cf9 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
@@ -457,16 +465,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
      *
      */