Fix warnings

This commit is contained in:
pancake 2015-06-02 10:25:40 +02:00
parent 757c2da65f
commit 3d47337ae6
2 changed files with 15 additions and 4 deletions

View File

@ -9,15 +9,26 @@ static RCore *core = NULL;
#if __UNIX__
// XXX check if its already opened
static RCoreFile *openself(void) {
RCoreFile *fd = NULL;
char *out = r_core_cmd_str (core, "o");
if (out) {
if (!strstr(out, "self://")) {
fd = r_core_file_open (core, "self://", R_IO_RW, 0);
}
free (out);
}
return fd;
}
static void sigusr1(int s) {
RCoreFile *fd = r_core_file_open (core, "self://", R_IO_RW, 0);
RCoreFile *fd = openself();
r_core_prompt_loop (core);
r_core_file_close (core, fd);
}
static void sigusr2(int s) {
RCoreFile *fd = r_core_file_open (core, "self://", R_IO_RW, 0);
(void)openself();
r_core_cmd0 (core, "=H&");
}
static void _libwrap_init() __attribute__ ((constructor));

View File

@ -3,7 +3,7 @@
static char get_string_type (const ut8 *buf, ut64 len){
ut64 needle = 0;
int rc, i;
char str_type;
char str_type = 0;
if (!buf)
return '?';
@ -1315,7 +1315,7 @@ static int cmd_print(void *data, const char *input) {
len = core->blocksize;
if (tmpseek != UT64_MAX) {
r_core_seek (core, off, SEEK_SET);
r_core_seek (core, tmpseek, SEEK_SET);
}
switch (*input) {
case 'w': //pw