Fix a compiler warning about const
This commit is contained in:
parent
f3078ebbc6
commit
8bbe58cdf7
@ -2185,7 +2185,7 @@ const gchar *utils_resource_dir(GeanyResourceDirType type)
|
||||
|
||||
void utils_start_new_geany_instance(const gchar *doc_path)
|
||||
{
|
||||
gchar **argv;
|
||||
const gchar *const *argv;
|
||||
const gchar *command = is_osx_bundle() ? "open" : "geany";
|
||||
gchar *exec_path = g_find_program_in_path(command);
|
||||
|
||||
@ -2195,16 +2195,16 @@ void utils_start_new_geany_instance(const gchar *doc_path)
|
||||
|
||||
if (is_osx_bundle())
|
||||
{
|
||||
gchar *osx_argv[] = {exec_path, "-n", "-a", "Geany", doc_path, NULL};
|
||||
const gchar *const osx_argv[] = {exec_path, "-n", "-a", "Geany", doc_path, NULL};
|
||||
argv = osx_argv;
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar *unix_argv[] = {exec_path, "-i", doc_path, NULL};
|
||||
const gchar *const unix_argv[] = {exec_path, "-i", doc_path, NULL};
|
||||
argv = unix_argv;
|
||||
}
|
||||
|
||||
if (!utils_spawn_async(NULL, argv, NULL, 0, NULL, NULL, NULL, &err))
|
||||
if (!utils_spawn_async(NULL, (gchar**) argv, NULL, 0, NULL, NULL, NULL, &err))
|
||||
{
|
||||
g_printerr("Unable to open new window: %s", err->message);
|
||||
g_error_free(err);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user