Fix for unused variable warning/error
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 7 Aug 2013 11:02:16 +0000 (13:02 +0200)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Thu, 6 Feb 2014 16:13:21 +0000 (17:13 +0100)
[Issue#] N/A
[Feature/Bug] N/A
[Problem] Buildbreak caused by unused variables
[Cause] Dlog logging macros have been recently disabled
[Solution] Variables marked as unused

[Verification] Successfull compilation

Change-Id: Idbbc5741ed14dda4484daac0edc2dbc4759c99e9

src/server2/dpl/log/src/dlog_log_provider.cpp

index 2b79f84..2f5f204 100644 (file)
@@ -25,6 +25,8 @@
 #include <sstream>
 #include <dlog.h>
 
+#define UNUSED __attribute__((unused))
+
 namespace SecurityServer {
 namespace Log {
 std::string DLOGLogProvider::FormatMessage(const char *message,
@@ -103,37 +105,37 @@ void DLOGLogProvider::Pedantic(const char *message,
                                               function).c_str());
 }
 
-void DLOGLogProvider::SecureDebug(const char *message,
-                            const char *filename,
-                            int line,
-                            const char *function)
+void DLOGLogProvider::SecureDebug(const char *message UNUSED,
+                            const char *filename UNUSED,
+                            int line UNUSED,
+                            const char *function UNUSED)
 {
     SECURE_SLOG(LOG_DEBUG, m_tag.get(), "%s",
         FormatMessage(message, filename, line, function).c_str());
 }
 
-void DLOGLogProvider::SecureInfo(const char *message,
-                           const char *filename,
-                           int line,
-                           const char *function)
+void DLOGLogProvider::SecureInfo(const char *message UNUSED,
+                           const char *filename UNUSED,
+                           int line UNUSED,
+                           const char *function UNUSED)
 {
     SECURE_SLOG(LOG_INFO, m_tag.get(), "%s",
         FormatMessage(message, filename, line, function).c_str());
 }
 
-void DLOGLogProvider::SecureWarning(const char *message,
-                              const char *filename,
-                              int line,
-                              const char *function)
+void DLOGLogProvider::SecureWarning(const char *message UNUSED,
+                              const char *filename UNUSED,
+                              int line UNUSED,
+                              const char *function UNUSED)
 {
     SECURE_SLOG(LOG_WARN, m_tag.get(), "%s",
         FormatMessage(message, filename, line, function).c_str());
 }
 
-void DLOGLogProvider::SecureError(const char *message,
-                            const char *filename,
-                            int line,
-                            const char *function)
+void DLOGLogProvider::SecureError(const char *message UNUSED,
+                            const char *filename UNUSED,
+                            int line UNUSED,
+                            const char *function UNUSED)
 {
     SECURE_SLOG(LOG_ERROR, m_tag.get(), "%s",
         FormatMessage(message, filename, line, function).c_str());