Skip to content

Commit

Permalink
Fix warnings in error_handle.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mkilgore committed Feb 14, 2024
1 parent d11c81e commit 373ea53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/c/libqb/src/error_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static uint32_t inclercl;

static const char *includedfilename;

static char *human_error(int32_t errorcode) {
static const char *human_error(int32_t errorcode) {
// clang-format off
switch (errorcode) {
case 0: return "No error";
Expand Down Expand Up @@ -159,7 +159,8 @@ void end();
extern void QBMAIN(void *);

void fix_error() {
char *errtitle = NULL, *errmess = NULL, *cp;
char *errtitle = NULL, *errmess = NULL;
const char *cp;
int prevent_handling = 0, len, v;
if ((new_error >= 300) && (new_error <= 315))
prevent_handling = 1;
Expand All @@ -172,7 +173,7 @@ void fix_error() {
qbs_set(binary_name, qbs_add(func_command(0, 1), qbs_new_txt_len("\0", 1)));
for (i = binary_name->len; i > 0; i--) {
if ((binary_name->chr[i - 1] == 47) || (binary_name->chr[i - 1] == 92)) {
qbs_set(binary_name, func_mid(binary_name, i + 1, NULL, 0));
qbs_set(binary_name, func_mid(binary_name, i + 1, 0, 0));
break;
}
}
Expand Down

0 comments on commit 373ea53

Please sign in to comment.