[gjs: 3/6] console: Make second GOptionEntry non-static
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 3/6] console: Make second GOptionEntry non-static
- Date: Fri, 2 Aug 2019 16:44:24 +0000 (UTC)
commit 9de52c2d8de729db1d36f90e07fa7f49bd74c5b2
Author: Philip Chimento <philip endlessm com>
Date: Wed Jul 31 15:25:51 2019 -0700
console: Make second GOptionEntry non-static
This should not be static, since that means it will outlive the stack
variables that it holds pointers to.
Caught by Clang static analyzer.
gjs/console.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gjs/console.cpp b/gjs/console.cpp
index 6c10d532..b094f07e 100644
--- a/gjs/console.cpp
+++ b/gjs/console.cpp
@@ -128,7 +128,7 @@ check_script_args_for_stray_gjs_args(int argc,
// Don't add new entries here. This is only for arguments that were
// previously accepted after the script name on the command line, for
// backwards compatibility.
- static GOptionEntry script_check_entries[] = {
+ GOptionEntry script_check_entries[] = {
{ "coverage-prefix", 'C', 0, G_OPTION_ARG_STRING_ARRAY, &new_coverage_prefixes },
{ "coverage-output", 0, 0, G_OPTION_ARG_STRING, &new_coverage_output_path },
{ "include-path", 'I', 0, G_OPTION_ARG_STRING_ARRAY, &new_include_paths },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]