From 673b06c193943fc354a2a6e7c520c041fada4b20 Mon Sep 17 00:00:00 2001 From: Karol Pawlowski Date: Thu, 11 Apr 2013 08:08:17 +0200 Subject: [PATCH] Fixing issues found by prevent [Issue#] LINUXWRT-211 [Bug] N/A [Cause] N/A [Solution] Remove issues [Verification] Build wrt-installer repository Change-Id: I6250a068a4e4c19c3ce174ba46ce62f74e99b294 --- src/jobs/widget_install/widget_installer_struct.h | 3 ++- src/wrt-installer/installer_callbacks_translate.cpp | 1 + src/wrt-installer/wrt_installer_api.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jobs/widget_install/widget_installer_struct.h b/src/jobs/widget_install/widget_installer_struct.h index 608cf44..2321a62 100644 --- a/src/jobs/widget_install/widget_installer_struct.h +++ b/src/jobs/widget_install/widget_installer_struct.h @@ -48,7 +48,8 @@ typedef void (*InstallerProgressCallback)(void *userParam, namespace InstallMode { enum Type { - INSTALL_MODE_WGT = 0, + WRONG_INSTALL_MODE = -1, + INSTALL_MODE_WGT, INSTALL_MODE_DIRECTORY, INSTALL_MODE_PRELOAD, REINSTALL_MODE_DIRECTORY diff --git a/src/wrt-installer/installer_callbacks_translate.cpp b/src/wrt-installer/installer_callbacks_translate.cpp index fda2937..ef479c8 100644 --- a/src/wrt-installer/installer_callbacks_translate.cpp +++ b/src/wrt-installer/installer_callbacks_translate.cpp @@ -207,6 +207,7 @@ void pluginInstallFinishedCallback(void *userParam, break; case Jobs::Exceptions::ErrorPluginInstallationFailed: errorStatus = WRT_INSTALLER_ERROR_PLUGIN_INSTALLATION_FAILED; + break; default: errorStatus = WRT_INSTALLER_ERROR_UNKNOWN; break; diff --git a/src/wrt-installer/wrt_installer_api.cpp b/src/wrt-installer/wrt_installer_api.cpp index 92f16c6..6280dd6 100644 --- a/src/wrt-installer/wrt_installer_api.cpp +++ b/src/wrt-installer/wrt_installer_api.cpp @@ -67,6 +67,7 @@ inline InstallMode::Type translateInstallMode( return InstallMode::REINSTALL_MODE_DIRECTORY; } Assert(true && "wrong argument is inputed"); + return InstallMode::WRONG_INSTALL_MODE; } static std::string cutOffFileName(const std::string& path) -- 2.7.4