NOISSUE fix some warnings
This commit is contained in:
parent
f259e9f727
commit
604295e6d5
@ -124,6 +124,8 @@ static LoadResult loadComponent(ComponentPtr component, shared_qobject_ptr<Task>
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: dead code. determine if this can still be useful?
|
||||||
|
/*
|
||||||
static LoadResult loadComponentList(ComponentPtr component, shared_qobject_ptr<Task>& loadTask, Net::Mode netmode)
|
static LoadResult loadComponentList(ComponentPtr component, shared_qobject_ptr<Task>& loadTask, Net::Mode netmode)
|
||||||
{
|
{
|
||||||
if(component->m_loaded)
|
if(component->m_loaded)
|
||||||
@ -147,6 +149,7 @@ static LoadResult loadComponentList(ComponentPtr component, shared_qobject_ptr<T
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static LoadResult loadIndex(shared_qobject_ptr<Task>& loadTask, Net::Mode netmode)
|
static LoadResult loadIndex(shared_qobject_ptr<Task>& loadTask, Net::Mode netmode)
|
||||||
{
|
{
|
||||||
|
@ -354,7 +354,8 @@ void VersionPage::on_downloadBtn_clicked()
|
|||||||
}
|
}
|
||||||
ProgressDialog tDialog(this);
|
ProgressDialog tDialog(this);
|
||||||
connect(updateTask.get(), SIGNAL(failed(QString)), SLOT(onGameUpdateError(QString)));
|
connect(updateTask.get(), SIGNAL(failed(QString)), SLOT(onGameUpdateError(QString)));
|
||||||
int ret = tDialog.execWithTask(updateTask.get());
|
// FIXME: unused return value
|
||||||
|
tDialog.execWithTask(updateTask.get());
|
||||||
updateButtons();
|
updateButtons();
|
||||||
m_container->refreshContainer();
|
m_container->refreshContainer();
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
element_value(element_value_type type, constant_pool &pool) : type(type), pool(pool) {};
|
element_value(element_value_type type, constant_pool &pool) : type(type), pool(pool) {};
|
||||||
|
virtual ~element_value() {}
|
||||||
|
|
||||||
element_value_type getElementValueType()
|
element_value_type getElementValueType()
|
||||||
{
|
{
|
||||||
|
@ -21,14 +21,12 @@ public:
|
|||||||
j_methodref = 10,
|
j_methodref = 10,
|
||||||
j_interface_methodref = 11,
|
j_interface_methodref = 11,
|
||||||
j_nameandtype = 12
|
j_nameandtype = 12
|
||||||
|
// FIXME: missing some constant types, see https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4
|
||||||
} type;
|
} type;
|
||||||
|
|
||||||
constant(util::membuffer &buf)
|
constant(util::membuffer &buf)
|
||||||
{
|
{
|
||||||
buf.read(type);
|
buf.read(type);
|
||||||
// invalid constant type!
|
|
||||||
if (type > j_nameandtype || type == (type_t)0 || type == (type_t)2)
|
|
||||||
throw new classfile_exception();
|
|
||||||
|
|
||||||
// load data depending on type
|
// load data depending on type
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -65,10 +63,13 @@ public:
|
|||||||
buf.read_be(name_and_type.name_index);
|
buf.read_be(name_and_type.name_index);
|
||||||
buf.read_be(name_and_type.descriptor_index);
|
buf.read_be(name_and_type.descriptor_index);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
// invalid constant type!
|
||||||
|
throw new classfile_exception();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constant(int fake)
|
constant(int)
|
||||||
{
|
{
|
||||||
type = j_hole;
|
type = j_hole;
|
||||||
}
|
}
|
||||||
@ -115,6 +116,9 @@ public:
|
|||||||
ss << "NameAndType: " << name_and_type.name_index << " "
|
ss << "NameAndType: " << name_and_type.name_index << " "
|
||||||
<< name_and_type.descriptor_index;
|
<< name_and_type.descriptor_index;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
ss << "Invalid entry (" << int(type) << ")";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
@ -166,10 +170,10 @@ public:
|
|||||||
*/
|
*/
|
||||||
void load(util::membuffer &buf)
|
void load(util::membuffer &buf)
|
||||||
{
|
{
|
||||||
|
// FIXME: @SANITY this should check for the end of buffer.
|
||||||
uint16_t length = 0;
|
uint16_t length = 0;
|
||||||
buf.read_be(length);
|
buf.read_be(length);
|
||||||
length--;
|
length--;
|
||||||
uint16_t index = 1;
|
|
||||||
const constant *last_constant = nullptr;
|
const constant *last_constant = nullptr;
|
||||||
while (length)
|
while (length)
|
||||||
{
|
{
|
||||||
@ -182,12 +186,10 @@ public:
|
|||||||
// push in a fake constant to preserve indexing
|
// push in a fake constant to preserve indexing
|
||||||
constants.push_back(constant(0));
|
constants.push_back(constant(0));
|
||||||
length -= 2;
|
length -= 2;
|
||||||
index += 2;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
length--;
|
length--;
|
||||||
index++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user