Fix warning reported by gcc7 in wasm.c

This commit is contained in:
pancake 2017-12-20 18:58:40 +01:00
parent 02a188ce36
commit 0c2eda71f8
2 changed files with 1 additions and 4 deletions

View file

@ -133,9 +133,7 @@ static RList *symbols(RBinFile *bf) {
if (!(ptr = R_NEW0 (RBinSymbol))) {
goto bad_alloc;
}
char tmp[R_BIN_SIZEOF_STRINGS];
snprintf (tmp, R_BIN_SIZEOF_STRINGS, "imp.%s.%s", imp->module_str, imp->field_str);
ptr->name = strdup(tmp);
ptr->name = r_str_newf ("imp.%s.%s", imp->module_str, imp->field_str);
ptr->forwarder = r_str_const ("NONE");
ptr->bind = r_str_const ("NONE");
switch (imp->kind) {

View file

@ -25,7 +25,6 @@ R_API void r_debug_snap_free(void *p) {
R_API int r_debug_snap_delete(RDebug *dbg, int idx) {
ut32 count = 0;
RListIter *iter;
RDebugSnap *snap;
if (idx == -1) {
r_list_free (dbg->snaps);
dbg->snaps = r_list_newf (r_debug_snap_free);