Skip to content

Commit

Permalink
fixing some warnings
Browse files Browse the repository at this point in the history
added some words to the dictionary
making the about dialog have the logo scaled correctly
  • Loading branch information
eteran committed Mar 18, 2024
1 parent 7858c2f commit 7405b37
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 18 deletions.
3 changes: 3 additions & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ words:
- Fabien
- hexview
- Kabatsayev
- konsole
- Mercês
- METATYPE
- Mohd
- nasm
- Nicoleau
- nofork
- Noto
- Olly
- Ollydbg
Expand All @@ -44,6 +46,7 @@ words:
- Scrollbars
- Shahril
- Sorokin
- stepover
- tbyte
- Teran
- xmmword
Expand Down
2 changes: 1 addition & 1 deletion include/Register.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class EDB_EXPORT Register {
result = -1ll;
std::memcpy(&result, &value_, bitSize_ / 8);
}
return result;
return static_cast<int64_t>(result);
}

void setScalarValue(std::uint64_t newValue);
Expand Down
2 changes: 1 addition & 1 deletion plugins/DebuggerCore/DebuggerCoreBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ std::shared_ptr<IBreakpoint> DebuggerCoreBase::findTriggeredBreakpoint(edb::addr

/**
* Decrements the reference count for the breakpoint found at the given address.
* If the refernce count goes to zero, then it is removed.
* If the reference count goes to zero, then it is removed.
* This is a no-op if there is no breakpoint present.
*
* @brief DebuggerCoreBase::removeBreakpoint
Expand Down
20 changes: 10 additions & 10 deletions plugins/DebuggerCore/unix/Unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,18 @@ Status Unix::execute_process(const QString &path, const QString &cwd, const QLis
// instead appear to launch shell
const int ret = execv(argv_pointers[0], argv_pointers);

// should be no need to cleanup, the process which allocated all that
// space no longer exists!
// if we get here...execv failed!
if (ret == -1) {
errorString = QString("execv() failed: %1").arg(strerror(errno));

p = argv_pointers;
while (*p) {
delete[] *p++;
}
delete[] argv_pointers;
// and the docs say that the return value IS -1. This behavior of execv only
// returning on errors confuses linters, so let's just assert what is the case
Q_ASSERT(ret == -1);

errorString = QString("execv() failed: %1").arg(strerror(errno));

p = argv_pointers;
while (*p) {
delete[] *p++;
}
delete[] argv_pointers;
}

// frankly, any return is technically an error I think
Expand Down
3 changes: 1 addition & 2 deletions plugins/InstructionInspector/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,7 @@ std::string runOBJDUMP(const std::vector<std::uint8_t> &bytes, edb::address_t ad
"--insn-width=15",
"--architecture=i386" + QString(bits == 64 ? ":x86-64" : ""),
"-M",
"intel,"
"intel-mnemonic",
"intel,intel-mnemonic",
#elif defined(EDB_ARM32)
"--insn-width=4",
"-m",
Expand Down
24 changes: 21 additions & 3 deletions src/DialogAbout.ui
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,29 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string/>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="pixmap">
<pixmap resource="debugger.qrc">:/debugger/images/edb.svg</pixmap>
<pixmap resource="res/debugger.qrc">:/debugger/images/edb.svg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion src/capstone-edb/include/Instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class EDB_EXPORT Instruction {
}

public:
int operation() const { return insn_ ? insn_->id : 0; }
unsigned int operation() const { return insn_ ? insn_->id : 0; }
std::size_t operandCount() const {
#if defined(EDB_X86) || defined(EDB_X86_64)
return insn_ ? insn_->detail->x86.op_count : 0;
Expand Down

0 comments on commit 7405b37

Please sign in to comment.