Fix some gcc warnings

This commit is contained in:
jvoisin 2014-05-08 23:20:42 +02:00
parent 4ad0f2a400
commit 76fbd4119c
6 changed files with 6 additions and 6 deletions

View File

@ -116,6 +116,6 @@ R_API RAnalHint *r_anal_hint_get(RAnal *a, ut64 addr) {
return NULL;
}
hint = r_anal_hint_from_string (a, addr, s);
free (s);
free ((void*)s);
return hint;
}

View File

@ -7,7 +7,7 @@
- handle sync to synchronize all the data on disk.
- actually listing only works in memory
- array_add doesnt needs index, right?
- remove unused arguments from r_meta_find (where ???)
- remove unused arguments from r_meta_find (where ?)
- implement r_meta_find
#endif

View File

@ -349,7 +349,7 @@ default:
if (anal->bits==16) {
// honor segment
op->jump = (addr&0xf0000) + oplen + \
(((addr&0xffff)+getval (&u.operand[0])&0xffff));
((((addr&0xffff)+getval (&u.operand[0]))&0xffff));
} else {
op->jump = addr + oplen + (int)getval (&u.operand[0]);
}

View File

@ -78,7 +78,7 @@ typedef struct r_socket_proc_t {
int pid;
} RSocketProc;
R_API RSocketProc *r_socket_proc_open(const char *argv[]);
R_API RSocketProc *r_socket_proc_open(char* const argv[]);
R_API int r_socket_proc_close(RSocketProc *sp);
R_API int r_socket_proc_read (RSocketProc *sp, unsigned char *buf, int len);
R_API int r_socket_proc_gets (RSocketProc *sp, char *buf, int size);

View File

@ -38,7 +38,7 @@ R_API int r_io_plugin_init(RIO *io) {
// memory leak here: static_plugin never freed
memcpy (static_plugin, io_static_plugins[i], sizeof (RIOPlugin));
if (!strncmp (static_plugin->name, "default", 7)) {
if (DEFAULT) free (DEFAULT);
if (DEFAULT) free ((void*)DEFAULT);
DEFAULT = static_plugin;
continue;
}

View File

@ -12,7 +12,7 @@
#define BUFFER_SIZE 4096
R_API struct r_socket_proc_t *r_socket_proc_open(const char *argv[]) {
R_API struct r_socket_proc_t *r_socket_proc_open(char* const argv[]) {
#if __UNIX__
RSocketProc *sp = R_NEW (RSocketProc);
#ifdef O_CLOEXEC