Fix few windows warnings

This commit is contained in:
pancake 2022-10-24 17:55:34 +02:00
parent 84d659656d
commit 0d3618414a
4 changed files with 6 additions and 8 deletions

View File

@ -26,7 +26,7 @@ R_API double r_reg_get_double(RReg *reg, RRegItem *item) {
}
R_API bool r_reg_set_double(RReg *reg, RRegItem *item, double value) {
r_return_val_if_fail (reg && item, 0.0f);
r_return_val_if_fail (reg && item, false);
ut8 *src;
switch (item->size) {
case 64:

View File

@ -2550,9 +2550,6 @@ R_API char *r_print_code_tocolor(const char *o) {
const char *st = strstr (p, " str.");
const char *w = r_str_trim_head_ro (p);
if (w == nl) {
eprintf ("EMPTY LINE\n");
sleep (1);
// empty line
p = w;
continue;
}

View File

@ -4,7 +4,7 @@
#include <r_cons.h>
#include <r_util/pj.h>
typedef float ft32;
typedef float ft32;
typedef double ft64;
#define WIRE_VARINT 0 // int32, int64, uint32, uint64, sint32, sint64, bool, enum
@ -137,7 +137,8 @@ static char *decode_buffer(PJ *pj, const ut8* start, const ut8* end, int padcnt,
pj_o (pj);
pj_ks (pj, "type", "64bit");
pj_kn (pj, "value", *i);
pj_kn (pj, "fvalue", *f);
double d = *f;
pj_kd (pj, "fvalue", d);
pj_end (pj);
} else if (mode == 'j') {
pj_n (pj, *i);
@ -231,7 +232,7 @@ static char *decode_buffer(PJ *pj, const ut8* start, const ut8* end, int padcnt,
pj_o (pj);
pj_ks (pj, "type", "32bit");
pj_kn (pj, "value", *i);
pj_kn (pj, "fvalue", *f);
pj_kd (pj, "fvalue", *f);
pj_end (pj);
} else if (mode == 'j') {
pj_n (pj, *i);

View File

@ -60,7 +60,7 @@ bool bochs_cmd_stop(libbochs_t * b) {
};
hKernel = GetModuleHandle (TEXT ("kernel32"));
FARPROC apiOffset = (FARPROC)GetProcAddress (hKernel, "GenerateConsoleCtrlEvent");
*((DWORD *)&buffer[20]) = (DWORD)apiOffset;
*((DWORD *)&buffer[20]) = (DWORD *)(size_t)apiOffset; // XXX
ExitCode = RunRemoteThread_(b, (const ut8*)&buffer, 0x1Eu, 0, &ExitCode) && ExitCode;
return ExitCode;
#else