summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-10-22 21:17:47 +0200
committerEthan Yonker <dees_troy@teamw.in>2015-10-25 00:36:24 +0200
commitd0514ba8064513864469906b19d1c055e6c3b481 (patch)
tree9ebd80e948650b21e0432b87bdb4ac3fa94f2f93 /gui
parentfix build in Omni 4.4 (diff)
downloadandroid_bootable_recovery-d0514ba8064513864469906b19d1c055e6c3b481.tar
android_bootable_recovery-d0514ba8064513864469906b19d1c055e6c3b481.tar.gz
android_bootable_recovery-d0514ba8064513864469906b19d1c055e6c3b481.tar.bz2
android_bootable_recovery-d0514ba8064513864469906b19d1c055e6c3b481.tar.lz
android_bootable_recovery-d0514ba8064513864469906b19d1c055e6c3b481.tar.xz
android_bootable_recovery-d0514ba8064513864469906b19d1c055e6c3b481.tar.zst
android_bootable_recovery-d0514ba8064513864469906b19d1c055e6c3b481.zip
Diffstat (limited to '')
-rw-r--r--gui/action.cpp76
-rw-r--r--gui/checkbox.cpp2
-rw-r--r--gui/console.cpp6
-rw-r--r--gui/gui.cpp4
-rw-r--r--gui/listbox.cpp2
-rw-r--r--gui/object.cpp2
-rw-r--r--gui/objects.hpp10
-rw-r--r--gui/resources.cpp2
-rw-r--r--gui/scrolllist.cpp4
9 files changed, 54 insertions, 54 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 0f8c7eea6..aafcd2ed4 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -280,7 +280,7 @@ GUIAction::GUIAction(xml_node<>* node)
}
}
-int GUIAction::NotifyTouch(TOUCH_STATE state, int x, int y)
+int GUIAction::NotifyTouch(TOUCH_STATE state __unused, int x __unused, int y __unused)
{
if (state == TOUCH_RELEASE)
doActions();
@@ -518,7 +518,7 @@ int GUIAction::reboot(std::string arg)
return 0;
}
-int GUIAction::home(std::string arg)
+int GUIAction::home(std::string arg __unused)
{
PageManager::SelectPackage("TWRP");
gui_changePage("main");
@@ -539,7 +539,7 @@ int GUIAction::page(std::string arg)
return gui_changePage(page_name);
}
-int GUIAction::reload(std::string arg)
+int GUIAction::reload(std::string arg __unused)
{
int check = 0, ret_val = 0;
std::string theme_path;
@@ -564,7 +564,7 @@ int GUIAction::reload(std::string arg)
return 0;
}
-int GUIAction::readBackup(std::string arg)
+int GUIAction::readBackup(std::string arg __unused)
{
string Restore_Name;
DataManager::GetValue("tw_restore", Restore_Name);
@@ -624,7 +624,7 @@ int GUIAction::unmount(std::string arg)
return 0;
}
-int GUIAction::restoredefaultsettings(std::string arg)
+int GUIAction::restoredefaultsettings(std::string arg __unused)
{
operation_start("Restore Defaults");
if (simulate) // Simulated so that people don't accidently wipe out the "simulation is on" setting
@@ -638,7 +638,7 @@ int GUIAction::restoredefaultsettings(std::string arg)
return 0;
}
-int GUIAction::copylog(std::string arg)
+int GUIAction::copylog(std::string arg __unused)
{
operation_start("Copy Log");
if (!simulate)
@@ -713,7 +713,7 @@ int GUIAction::compute(std::string arg)
return -1;
}
-int GUIAction::setguitimezone(std::string arg)
+int GUIAction::setguitimezone(std::string arg __unused)
{
string SelectedZone;
DataManager::GetValue(TW_TIME_ZONE_GUISEL, SelectedZone); // read the selected time zone into SelectedZone
@@ -743,7 +743,7 @@ int GUIAction::overlay(std::string arg)
return gui_changeOverlay(arg);
}
-int GUIAction::queuezip(std::string arg)
+int GUIAction::queuezip(std::string arg __unused)
{
if (zip_queue_index >= 10) {
gui_print("Maximum zip queue reached!\n");
@@ -757,7 +757,7 @@ int GUIAction::queuezip(std::string arg)
return 0;
}
-int GUIAction::cancelzip(std::string arg)
+int GUIAction::cancelzip(std::string arg __unused)
{
if (zip_queue_index <= 0) {
gui_print("Minimum zip queue reached!\n");
@@ -769,7 +769,7 @@ int GUIAction::cancelzip(std::string arg)
return 0;
}
-int GUIAction::queueclear(std::string arg)
+int GUIAction::queueclear(std::string arg __unused)
{
zip_queue_index = 0;
DataManager::SetValue(TW_ZIP_QUEUE_COUNT, zip_queue_index);
@@ -784,7 +784,7 @@ int GUIAction::sleep(std::string arg)
return 0;
}
-int GUIAction::appenddatetobackupname(std::string arg)
+int GUIAction::appenddatetobackupname(std::string arg __unused)
{
operation_start("AppendDateToBackupName");
string Backup_Name;
@@ -797,7 +797,7 @@ int GUIAction::appenddatetobackupname(std::string arg)
return 0;
}
-int GUIAction::generatebackupname(std::string arg)
+int GUIAction::generatebackupname(std::string arg __unused)
{
operation_start("GenerateBackupName");
TWFunc::Auto_Generate_Backup_Name();
@@ -805,7 +805,7 @@ int GUIAction::generatebackupname(std::string arg)
return 0;
}
-int GUIAction::checkpartitionlist(std::string arg)
+int GUIAction::checkpartitionlist(std::string arg __unused)
{
string Wipe_List, wipe_path;
int count = 0;
@@ -832,7 +832,7 @@ int GUIAction::checkpartitionlist(std::string arg)
return 0;
}
-int GUIAction::getpartitiondetails(std::string arg)
+int GUIAction::getpartitiondetails(std::string arg __unused)
{
string Wipe_List, wipe_path;
int count = 0;
@@ -903,7 +903,7 @@ int GUIAction::getpartitiondetails(std::string arg)
return 0;
}
-int GUIAction::screenshot(std::string arg)
+int GUIAction::screenshot(std::string arg __unused)
{
time_t tm;
char path[256];
@@ -1140,7 +1140,7 @@ int GUIAction::wipe(std::string arg)
return 0;
}
-int GUIAction::refreshsizes(std::string arg)
+int GUIAction::refreshsizes(std::string arg __unused)
{
operation_start("Refreshing Sizes");
if (simulate) {
@@ -1200,7 +1200,7 @@ int GUIAction::nandroid(std::string arg)
return 0;
}
-int GUIAction::cancelbackup(std::string arg) {
+int GUIAction::cancelbackup(std::string arg __unused) {
if (simulate) {
PartitionManager.stop_backup.set_value(1);
}
@@ -1213,7 +1213,7 @@ int GUIAction::cancelbackup(std::string arg) {
return 0;
}
-int GUIAction::fixpermissions(std::string arg)
+int GUIAction::fixpermissions(std::string arg __unused)
{
int op_status = 0;
@@ -1244,7 +1244,7 @@ int GUIAction::dd(std::string arg)
return 0;
}
-int GUIAction::partitionsd(std::string arg)
+int GUIAction::partitionsd(std::string arg __unused)
{
operation_start("Partition SD Card");
int ret_val = 0;
@@ -1266,7 +1266,7 @@ int GUIAction::partitionsd(std::string arg)
}
-int GUIAction::installhtcdumlock(std::string arg)
+int GUIAction::installhtcdumlock(std::string arg __unused)
{
operation_start("Install HTC Dumlock");
if (simulate) {
@@ -1278,7 +1278,7 @@ int GUIAction::installhtcdumlock(std::string arg)
return 0;
}
-int GUIAction::htcdumlockrestoreboot(std::string arg)
+int GUIAction::htcdumlockrestoreboot(std::string arg __unused)
{
operation_start("HTC Dumlock Restore Boot");
if (simulate) {
@@ -1290,7 +1290,7 @@ int GUIAction::htcdumlockrestoreboot(std::string arg)
return 0;
}
-int GUIAction::htcdumlockreflashrecovery(std::string arg)
+int GUIAction::htcdumlockreflashrecovery(std::string arg __unused)
{
operation_start("HTC Dumlock Reflash Recovery");
if (simulate) {
@@ -1386,7 +1386,7 @@ int GUIAction::terminalcommand(std::string arg)
return 0;
}
-int GUIAction::killterminal(std::string arg)
+int GUIAction::killterminal(std::string arg __unused)
{
int op_status = 0;
@@ -1400,7 +1400,7 @@ int GUIAction::killterminal(std::string arg)
return 0;
}
-int GUIAction::reinjecttwrp(std::string arg)
+int GUIAction::reinjecttwrp(std::string arg __unused)
{
int op_status = 0;
operation_start("ReinjectTWRP");
@@ -1416,7 +1416,7 @@ int GUIAction::reinjecttwrp(std::string arg)
return 0;
}
-int GUIAction::checkbackupname(std::string arg)
+int GUIAction::checkbackupname(std::string arg __unused)
{
int op_status = 0;
@@ -1433,7 +1433,7 @@ int GUIAction::checkbackupname(std::string arg)
return 0;
}
-int GUIAction::decrypt(std::string arg)
+int GUIAction::decrypt(std::string arg __unused)
{
int op_status = 0;
@@ -1468,7 +1468,7 @@ int GUIAction::decrypt(std::string arg)
return 0;
}
-int GUIAction::adbsideload(std::string arg)
+int GUIAction::adbsideload(std::string arg __unused)
{
operation_start("Sideload");
if (simulate) {
@@ -1518,7 +1518,7 @@ int GUIAction::adbsideload(std::string arg)
return 0;
}
-int GUIAction::adbsideloadcancel(std::string arg)
+int GUIAction::adbsideloadcancel(std::string arg __unused)
{
struct stat st;
DataManager::SetValue("tw_has_cancel", 0); // Remove cancel button from gui
@@ -1542,7 +1542,7 @@ int GUIAction::adbsideloadcancel(std::string arg)
return 0;
}
-int GUIAction::openrecoveryscript(std::string arg)
+int GUIAction::openrecoveryscript(std::string arg __unused)
{
int op_status = 1;
@@ -1584,7 +1584,7 @@ int GUIAction::openrecoveryscript(std::string arg)
return 0;
}
-int GUIAction::installsu(std::string arg)
+int GUIAction::installsu(std::string arg __unused)
{
int op_status = 0;
@@ -1600,7 +1600,7 @@ int GUIAction::installsu(std::string arg)
return 0;
}
-int GUIAction::fixsu(std::string arg)
+int GUIAction::fixsu(std::string arg __unused)
{
int op_status = 0;
@@ -1616,7 +1616,7 @@ int GUIAction::fixsu(std::string arg)
return 0;
}
-int GUIAction::decrypt_backup(std::string arg)
+int GUIAction::decrypt_backup(std::string arg __unused)
{
int op_status = 0;
@@ -1640,7 +1640,7 @@ int GUIAction::decrypt_backup(std::string arg)
return 0;
}
-int GUIAction::repair(std::string arg)
+int GUIAction::repair(std::string arg __unused)
{
int op_status = 0;
@@ -1662,7 +1662,7 @@ int GUIAction::repair(std::string arg)
return 0;
}
-int GUIAction::resize(std::string arg)
+int GUIAction::resize(std::string arg __unused)
{
int op_status = 0;
@@ -1684,7 +1684,7 @@ int GUIAction::resize(std::string arg)
return 0;
}
-int GUIAction::changefilesystem(std::string arg)
+int GUIAction::changefilesystem(std::string arg __unused)
{
int op_status = 0;
@@ -1707,7 +1707,7 @@ int GUIAction::changefilesystem(std::string arg)
return 0;
}
-int GUIAction::startmtp(std::string arg)
+int GUIAction::startmtp(std::string arg __unused)
{
int op_status = 0;
@@ -1721,7 +1721,7 @@ int GUIAction::startmtp(std::string arg)
return 0;
}
-int GUIAction::stopmtp(std::string arg)
+int GUIAction::stopmtp(std::string arg __unused)
{
int op_status = 0;
@@ -1735,7 +1735,7 @@ int GUIAction::stopmtp(std::string arg)
return 0;
}
-int GUIAction::flashimage(std::string arg)
+int GUIAction::flashimage(std::string arg __unused)
{
int op_status = 0;
diff --git a/gui/checkbox.cpp b/gui/checkbox.cpp
index 8eb0f529d..1760bac25 100644
--- a/gui/checkbox.cpp
+++ b/gui/checkbox.cpp
@@ -148,7 +148,7 @@ int GUICheckbox::SetRenderPos(int x, int y, int w, int h)
return 0;
}
-int GUICheckbox::NotifyTouch(TOUCH_STATE state, int x, int y)
+int GUICheckbox::NotifyTouch(TOUCH_STATE state, int x __unused, int y __unused)
{
if (!isConditionTrue())
return -1;
diff --git a/gui/console.cpp b/gui/console.cpp
index 2d6414ea4..47caadb15 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -195,7 +195,7 @@ int GUIConsole::RenderConsole(void)
// if last line is fully visible, keep tracking the last line when new lines are added
int bottom_offset = GetDisplayRemainder() - actualItemHeight;
- bool isAtBottom = firstDisplayedItem == GetItemCount() - GetDisplayItemCount() - (bottom_offset != 0) && y_offset == bottom_offset;
+ bool isAtBottom = firstDisplayedItem == (int)GetItemCount() - GetDisplayItemCount() - (bottom_offset != 0) && y_offset == bottom_offset;
if (isAtBottom)
scrollToEnd = true;
#if 0
@@ -304,7 +304,7 @@ size_t GUIConsole::GetItemCount()
return rConsole.size();
}
-void GUIConsole::RenderItem(size_t itemindex, int yPos, bool selected)
+void GUIConsole::RenderItem(size_t itemindex, int yPos, bool selected __unused)
{
// Set the color for the font
if (rConsoleColor[itemindex] == "normal") {
@@ -322,7 +322,7 @@ void GUIConsole::RenderItem(size_t itemindex, int yPos, bool selected)
gr_textEx_scaleW(mRenderX, yPos, text, mFont->GetResource(), mRenderW, TOP_LEFT, 0);
}
-void GUIConsole::NotifySelect(size_t item_selected)
+void GUIConsole::NotifySelect(size_t item_selected __unused)
{
// do nothing - console ignores selections
}
diff --git a/gui/gui.cpp b/gui/gui.cpp
index ebd70534c..a5ac33e86 100644
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -796,7 +796,7 @@ extern "C" int gui_init(void)
printf("Unable to locate '%s'\nDid you set a TW_THEME in your config files?\n", curtain_path.c_str());
return -1;
}
- if (gr_get_width(source_Surface) != gr_fb_width() || gr_get_height(source_Surface) != gr_fb_height()) {
+ if (gr_get_width(source_Surface) != (unsigned)gr_fb_width() || gr_get_height(source_Surface) != (unsigned)gr_fb_height()) {
// We need to scale the curtain to fit the screen
float scale_w = (float)gr_fb_width() / (float)gr_get_width(source_Surface);
float scale_h = (float)gr_fb_height() / (float)gr_get_height(source_Surface);
@@ -946,7 +946,7 @@ extern "C" int gui_startPage(const char *page_name, const int allow_commands, in
return runPages(page_name, stop_on_page_done);
}
-static void * console_thread(void *cookie)
+static void * console_thread(void *cookie __unused)
{
PageManager::SwitchToConsole();
diff --git a/gui/listbox.cpp b/gui/listbox.cpp
index be2b48698..0a53a7c88 100644
--- a/gui/listbox.cpp
+++ b/gui/listbox.cpp
@@ -158,7 +158,7 @@ int GUIListBox::NotifyVarChange(const std::string& varName, const std::string& v
if (mVisibleItemsOld != mVisibleItems) {
mUpdate = 1; // some item's visibility has changed
- if (firstDisplayedItem >= mVisibleItems.size()) {
+ if (firstDisplayedItem >= (int)mVisibleItems.size()) {
// all items in the view area were removed - make last item visible
SetVisibleListLocation(mVisibleItems.empty() ? 0 : mVisibleItems.size()-1);
}
diff --git a/gui/object.cpp b/gui/object.cpp
index eae56e644..206f2c726 100644
--- a/gui/object.cpp
+++ b/gui/object.cpp
@@ -141,7 +141,7 @@ bool GUIObject::isConditionValid()
return !mConditions.empty();
}
-int GUIObject::NotifyVarChange(const std::string& varName, const std::string& value)
+int GUIObject::NotifyVarChange(const std::string& varName, const std::string& value __unused)
{
mConditionsResult = UpdateConditions(mConditions, varName);
return 0;
diff --git a/gui/objects.hpp b/gui/objects.hpp
index cf92024bb..73d8717d5 100644
--- a/gui/objects.hpp
+++ b/gui/objects.hpp
@@ -72,7 +72,7 @@ public:
virtual int SetPlacement(Placement placement) { mPlacement = placement; return 0; }
// SetPageFocus - Notify when a page gains or loses focus
- virtual void SetPageFocus(int inFocus) { return; }
+ virtual void SetPageFocus(int inFocus __unused) { return; }
protected:
int mRenderX, mRenderY, mRenderW, mRenderH;
@@ -88,11 +88,11 @@ public:
public:
// NotifyTouch - Notify of a touch event
// Return 0 on success, >0 to ignore remainder of touch, and <0 on error
- virtual int NotifyTouch(TOUCH_STATE state, int x, int y) { return 0; }
+ virtual int NotifyTouch(TOUCH_STATE state __unused, int x __unused, int y __unused) { return 0; }
// NotifyKey - Notify of a key press
// Return 0 on success (and consume key), >0 to pass key to next handler, and <0 on error
- virtual int NotifyKey(int key, bool down) { return 1; }
+ virtual int NotifyKey(int key __unused, bool down __unused) { return 1; }
// GetRenderPos - Returns the current position of the object
virtual int GetActionPos(int& x, int& y, int& w, int& h) { x = mActionX; y = mActionY; w = mActionW; h = mActionH; return 0; }
@@ -159,7 +159,7 @@ public:
public:
// NotifyKeyboard - Notify of keyboard input
// Return 0 on success (and consume key), >0 to pass key to next handler, and <0 on error
- virtual int NotifyKeyboard(int key) { return 1; }
+ virtual int NotifyKeyboard(int key __unused) { return 1; }
virtual int SetInputFocus(int focus) { HasInputFocus = focus; return 1; }
@@ -469,7 +469,7 @@ protected:
// render a single item in rect (mRenderX, yPos, mRenderW, actualItemHeight)
virtual void RenderItem(size_t itemindex, int yPos, bool selected);
// an item was selected
- virtual void NotifySelect(size_t item_selected) {}
+ virtual void NotifySelect(size_t item_selected __unused) {}
// render a standard-layout list item with optional icon and text
void RenderStdItem(int yPos, bool selected, ImageResource* icon, const char* text, int iconAndTextH = 0);
diff --git a/gui/resources.cpp b/gui/resources.cpp
index 361f1d8e0..253d438f4 100644
--- a/gui/resources.cpp
+++ b/gui/resources.cpp
@@ -23,7 +23,7 @@ extern "C" {
#define TMP_RESOURCE_NAME "/tmp/extract.bin"
-Resource::Resource(xml_node<>* node, ZipArchive* pZip)
+Resource::Resource(xml_node<>* node, ZipArchive* pZip __unused)
{
if (node && node->first_attribute("name"))
mName = node->first_attribute("name")->value();
diff --git a/gui/scrolllist.cpp b/gui/scrolllist.cpp
index 7bd4598e7..a033205bb 100644
--- a/gui/scrolllist.cpp
+++ b/gui/scrolllist.cpp
@@ -311,7 +311,7 @@ int GUIScrollList::Render(void)
return 0;
}
-void GUIScrollList::RenderItem(size_t itemindex, int yPos, bool selected)
+void GUIScrollList::RenderItem(size_t itemindex __unused, int yPos, bool selected)
{
RenderStdItem(yPos, selected, NULL, "implement RenderItem!");
}
@@ -397,7 +397,7 @@ int GUIScrollList::Update(void)
return 0;
}
-size_t GUIScrollList::HitTestItem(int x, int y)
+size_t GUIScrollList::HitTestItem(int x __unused, int y)
{
// We only care about y position
if (y < mRenderY || y - mRenderY <= mHeaderH || y - mRenderY > mRenderH)