mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-07 14:59:10 +00:00
linux-user: arg_table need not have global scope
Declare arg_table to be "static const", and adjust the two users to also be const. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
parent
d03c98d80f
commit
42644cee08
@ -3222,7 +3222,7 @@ struct qemu_argument {
|
|||||||
const char *help;
|
const char *help;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct qemu_argument arg_table[] = {
|
static const struct qemu_argument arg_table[] = {
|
||||||
{"h", "", false, handle_arg_help,
|
{"h", "", false, handle_arg_help,
|
||||||
"", "print this help"},
|
"", "print this help"},
|
||||||
{"g", "QEMU_GDB", true, handle_arg_gdb,
|
{"g", "QEMU_GDB", true, handle_arg_gdb,
|
||||||
@ -3264,7 +3264,7 @@ struct qemu_argument arg_table[] = {
|
|||||||
|
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
struct qemu_argument *arginfo;
|
const struct qemu_argument *arginfo;
|
||||||
int maxarglen;
|
int maxarglen;
|
||||||
int maxenvlen;
|
int maxenvlen;
|
||||||
|
|
||||||
@ -3330,7 +3330,7 @@ static int parse_args(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
const char *r;
|
const char *r;
|
||||||
int optind;
|
int optind;
|
||||||
struct qemu_argument *arginfo;
|
const struct qemu_argument *arginfo;
|
||||||
|
|
||||||
for (arginfo = arg_table; arginfo->handle_opt != NULL; arginfo++) {
|
for (arginfo = arg_table; arginfo->handle_opt != NULL; arginfo++) {
|
||||||
if (arginfo->env == NULL) {
|
if (arginfo->env == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user