Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23d8aaef authored by Matt Mower's avatar Matt Mower Committed by Dees Troy
Browse files

Unused variable cleanup

Change-Id: I2397d0bd221dcf5c9d0f971ba157519bcf014a70
parent 029a82db
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ void DataManager::sanitize_device_id(char* device_id) {

void DataManager::get_device_id(void) {
	FILE *fp;
	size_t i;
	char line[2048];
	char hardware_id[HWID_MAX] = { 0 };
	char device_id[DEVID_MAX] = { 0 };
@@ -104,7 +103,7 @@ void DataManager::get_device_id(void) {
	if (strcmp(model_id, "error") != 0) {
		LOGINFO("=> product model: '%s'\n", model_id);
		// Replace spaces with underscores
		for (i = 0; i < strlen(model_id); i++) {
		for (size_t i = 0; i < strlen(model_id); i++) {
			if (model_id[i] == ' ')
				model_id[i] = '_';
		}
@@ -880,7 +879,6 @@ int DataManager::GetMagicValue(const string& varName, string& value)
		string cpu_temp_file;
		static unsigned long convert_temp = 0;
		static time_t cpuSecCheck = 0;
		int divisor = 0;
		struct timeval curTime;
		string results;

@@ -997,7 +995,7 @@ void DataManager::ReadSettingsFile(void)
#ifndef TW_OEM_BUILD
	// Load up the values for TWRP - Sleep to let the card be ready
	char mkdir_path[255], settings_file[255];
	int is_enc, has_dual, use_ext, has_data_media, has_ext;
	int is_enc, has_data_media;

	GetValue(TW_IS_ENCRYPTED, is_enc);
	GetValue(TW_HAS_DATA_MEDIA, has_data_media);
+2 −8
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ GUIAction::mapFunc GUIAction::mf;
std::set<string> GUIAction::setActionsRunningInCallerThread;
static string zip_queue[10];
static int zip_queue_index;
static pthread_t terminal_command;
pid_t sideload_child_pid;

static void *ActionThread_work_wrapper(void *data);
@@ -861,7 +860,6 @@ int GUIAction::checkpartitionlist(std::string arg)
int GUIAction::getpartitiondetails(std::string arg)
{
	string List, part_path;
	int count = 0;

	if (arg.empty())
		arg = "tw_wipe_list";
@@ -1078,7 +1076,7 @@ int GUIAction::wipe(std::string arg)
		else if (arg == "DATAMEDIA") {
			ret_val = PartitionManager.Format_Data();
		} else if (arg == "INTERNAL") {
			int has_datamedia, dual_storage;
			int has_datamedia;

			DataManager::GetValue(TW_HAS_DATA_MEDIA, has_datamedia);
			if (has_datamedia) {
@@ -1097,7 +1095,6 @@ int GUIAction::wipe(std::string arg)
			string Wipe_List, wipe_path;
			bool skip = false;
			ret_val = true;
			TWPartition* wipe_part = NULL;

			DataManager::GetValue("tw_wipe_list", Wipe_List);
			LOGINFO("wipe list '%s'\n", Wipe_List.c_str());
@@ -1384,7 +1381,7 @@ int GUIAction::terminalcommand(std::string arg)
		if (fp == NULL) {
			LOGERR("Error opening command to run (%s).\n", strerror(errno));
		} else {
			int fd = fileno(fp), has_data = 0, check = 0, keep_going = -1, bytes_read = 0;
			int fd = fileno(fp), has_data = 0, check = 0, keep_going = -1;
			struct timeval timeout;
			fd_set fdset;

@@ -1425,8 +1422,6 @@ int GUIAction::terminalcommand(std::string arg)

int GUIAction::killterminal(std::string arg __unused)
{
	int op_status = 0;

	LOGINFO("Sending kill command...\n");
	operation_start("KillCommand");
	DataManager::SetValue("tw_operation_status", 0);
@@ -1883,7 +1878,6 @@ int GUIAction::setbootslot(std::string arg)

int GUIAction::checkforapp(std::string arg __unused)
{
	int op_status = 1;
	operation_start("Check for TWRP App");
	if (!simulate)
	{
+0 −1
Original line number Diff line number Diff line
@@ -305,7 +305,6 @@ size_t GUIFileSelector::GetItemCount()
void GUIFileSelector::RenderItem(size_t itemindex, int yPos, bool selected)
{
	size_t folderSize = mShowFolders ? mFolderList.size() : 0;
	size_t fileSize = mShowFiles ? mFileList.size() : 0;

	ImageResource* icon;
	std::string text;
+0 −1
Original line number Diff line number Diff line
@@ -346,7 +346,6 @@ void GUIKeyboard::DrawKey(Key& key, int keyX, int keyY, int keyW, int keyH)
		void* fontResource = mLongpressFont->GetResource();
		gr_color(mLongpressFontColor.red, mLongpressFontColor.green, mLongpressFontColor.blue, mLongpressFontColor.alpha);
		string text(1, keychar);
		int textH = mLongpressFont->GetHeight();
		int textW = gr_ttf_measureEx(text.c_str(), fontResource);
		int textX = keyX + keyW - longpressOffsetX - textW;
		int textY = keyY + longpressOffsetY;
+0 −2
Original line number Diff line number Diff line
@@ -99,8 +99,6 @@ int GUIPartitionList::Update(void)
	GUIScrollList::Update();

	if (updateList) {
		int listSize = 0;

		// Completely update the list if needed -- Used primarily for
		// restore as the list for restore will change depending on what
		// partitions were backed up
Loading