mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 17:28:49 -10:00
msg_hash: fix orphan _msg references after _pair conversion
Commit 9ddd17a's conversion script rewrote _msg references that
appeared BETWEEN the declaration and the runloop_msg_queue_push
call, but missed _msg references AFTER the push. In RetroArch
the LOG-after-push idiom is common — the message is queued for
the OSD then RARCH_LOG/WARN/ERR logs it to the console too — so
several converted blocks ended up with the declaration renamed
to _p but the trailing log line still referencing _msg, which
no longer exists.
Build failure observed by the maintainer:
retroarch.c:3648:41: error: '_msg' undeclared (first use in
this function)
3648 | RARCH_ERR("[Replay] %s.\n", _msg);
Sweep every block where 'msg_hash_str_pair_t _p' was introduced
and rewrite every remaining whole-word _msg reference inside that
block's scope (until the matching closing brace at lower indent,
or the next _p / _msg declaration which would introduce a new
scope) to _p.s.
10 sites fixed across 3 files:
retroarch.c 2 (CMD_EVENT_LOAD_MOVIE_FILE,
CMD_EVENT_RECORD_TOGGLE error paths)
runahead.c 6 (six warning logs after pushes)
tasks/task_movie.c 2 (bsv_movie_start_record error,
bsv_movie_start_playback log)
All other converted files were already clean — they had no
log-after-push uses of _msg.
Behavior is byte-identical: same string formatted into the same
log call, just sourced from _p.s (which is byte-equal to what
msg_hash_to_str(msg) would return) instead of _msg.
This commit is contained in:
1 parent
a50bb8d386
commit
c6e570a621
3 files changed
+10
-10
No files matched your search
+2
-2
@@ -3645,7 +3645,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
msg_hash_to_str_pair(MSG_FAILED_TO_LOAD_MOVIE_FILE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_ERR("[Replay] %s.\n", _msg);
|
||||
RARCH_ERR("[Replay] %s.\n", _p.s);
|
||||
}
|
||||
return res;
|
||||
#else
|
||||
@@ -3677,7 +3677,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_FAILED_TO_START_MOVIE_RECORD);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_ERR("[Replay] %s.\n", _msg);
|
||||
RARCH_ERR("[Replay] %s.\n", _p.s);
|
||||
}
|
||||
return res;
|
||||
#else
|
||||
|
||||
+6
-6
@@ -1249,7 +1249,7 @@ void runahead_run(void *data,
|
||||
if (!runahead_hide_warnings)
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 2 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _p.s);
|
||||
goto force_input_dirty;
|
||||
}
|
||||
}
|
||||
@@ -1301,7 +1301,7 @@ void runahead_run(void *data,
|
||||
msg_hash_to_str_pair(MSG_RUNAHEAD_FAILED_TO_SAVE_STATE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _p.s);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1313,7 +1313,7 @@ void runahead_run(void *data,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RUNAHEAD_FAILED_TO_LOAD_STATE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _p.s);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1330,7 +1330,7 @@ void runahead_run(void *data,
|
||||
runloop_st->flags &= ~RUNLOOP_FLAG_RUNAHEAD_SECONDARY_CORE_AVAILABLE;
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _p.s);
|
||||
goto force_input_dirty;
|
||||
}
|
||||
|
||||
@@ -1352,7 +1352,7 @@ void runahead_run(void *data,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RUNAHEAD_FAILED_TO_SAVE_STATE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _p.s);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1361,7 +1361,7 @@ void runahead_run(void *data,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RUNAHEAD_FAILED_TO_LOAD_STATE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _p.s);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -264,7 +264,7 @@ static bool bsv_movie_start_record(input_driver_state_t * input_st, char *path)
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_FAILED_TO_START_MOVIE_RECORD);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_ERR("[Replay] %s\n", _msg);
|
||||
RARCH_ERR("[Replay] %s\n", _p.s);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ bool movie_stop_record(input_driver_state_t *input_st)
|
||||
return false;
|
||||
runloop_msg_queue_push(_p.s, _p.len, 2, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_LOG("[Replay] %s\n", _msg);
|
||||
RARCH_LOG("[Replay] %s\n", _p.s);
|
||||
#ifdef HAVE_STATESTREAM
|
||||
#if DEBUG
|
||||
RARCH_DBG("[Replay] superblock histogram\n");
|
||||
|
||||
Reference in new issue
Block a user