Skip to content

Commit 9b33151

Browse files
committed
Addressed warnings.
1 parent 2e00fb2 commit 9b33151

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

cfg.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#pragma once
2-
#ifndef _CFG
3-
#define _CFG
42
#include "pch.h"
5-
#include "log.h";
3+
#include "log.h"
64
#include "util.h"
75

86
namespace cfg
@@ -314,6 +312,4 @@ namespace cfg
314312
_properties.push_back(prop);
315313
}
316314
};
317-
}
318-
319-
#endif
315+
}

log.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace logging
2424
fprintf(logfile, "[%s] [%s] %02d:%02d:%02d ", HEADER, tag, local_time->tm_hour, local_time->tm_min, local_time->tm_sec);
2525

2626
va_list args;
27-
va_start(args, _fmt);
27+
va_start(args, fmt);
2828

2929
vprintf(_fmt, args);
3030
vfprintf(logfile, _fmt, args);
@@ -49,7 +49,7 @@ namespace logging
4949
logfile = fopen(LOG_FILE, "w+");
5050

5151
va_list args;
52-
va_start(args, _fmt);
52+
va_start(args, fmt);
5353

5454
vprintf(_fmt, args);
5555
vfprintf(logfile, _fmt, args);

memory.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ namespace memory
239239
}
240240
else
241241
{
242-
bytes.push_back(strtoul(i, &i, 16));
242+
bytes.push_back(static_cast<uint8_t>(strtoul(i, &i, 16)));
243243
mask.push_back(1);
244244
}
245245
}
@@ -312,7 +312,9 @@ namespace memory
312312
}
313313

314314
if (closestMatch)
315+
{
315316
dbg("Failed to find pattern, closest match is 0x%p [%d/%d]", closestMatch, closestMatchCount, bytes.size());
317+
}
316318

317319
return false;
318320
}
@@ -536,7 +538,7 @@ namespace memory
536538
if (pattern::find(pattern.pattern, &pointer, moduleName))
537539
{
538540
valid = true;
539-
pointer = pointer.add(pattern.offset);
541+
pointer = pointer.add(static_cast<int32_t>(pattern.offset));
540542
break;
541543
}
542544
}

util.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,7 @@ namespace util
105105
fs::remove(filePath);
106106
return true;
107107
}
108-
catch (const std::exception& ex)
109-
{
110-
;
111-
}
108+
catch (const std::exception&) {}
112109
}
113110

114111
return false;

0 commit comments

Comments
 (0)