[nautilus] general: Use parameter type list, even if function takes none
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] general: Use parameter type list, even if function takes none
- Date: Tue, 16 Aug 2022 16:38:18 +0000 (UTC)
commit 95d35aedf68f0398a6ee9e0b0af9ce80528fdc22
Author: Timo <timo capa gmail com>
Date: Tue Aug 16 16:38:16 2022 +0000
general: Use parameter type list, even if function takes none
Newer compiler versions (i.e. Clang 15) failed to compile nautilus,
because the declaration did not match the function definition.
See: https://reviews.llvm.org/D122895
Fixes #2378
src/nautilus-file-undo-manager.c | 4 ++--
src/nautilus-module.c | 2 +-
src/nautilus-starred-directory.c | 2 +-
src/nautilus-toolbar.c | 2 +-
src/nautilus-view-model.c | 2 +-
test/automated/displayless/test-utilities.c | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/nautilus-file-undo-manager.c b/src/nautilus-file-undo-manager.c
index 2a886176f..f2d1eebcf 100644
--- a/src/nautilus-file-undo-manager.c
+++ b/src/nautilus-file-undo-manager.c
@@ -258,13 +258,13 @@ nautilus_file_undo_manager_get_state (void)
gboolean
-nautilus_file_undo_manager_is_operating ()
+nautilus_file_undo_manager_is_operating (void)
{
return undo_singleton->is_operating;
}
NautilusFileUndoManager *
-nautilus_file_undo_manager_get ()
+nautilus_file_undo_manager_get (void)
{
return undo_singleton;
}
diff --git a/src/nautilus-module.c b/src/nautilus-module.c
index cd889ff18..ced810ed3 100644
--- a/src/nautilus-module.c
+++ b/src/nautilus-module.c
@@ -211,7 +211,7 @@ nautilus_module_load_file (const char *filename,
}
char *
-nautilus_module_get_installed_module_names ()
+nautilus_module_get_installed_module_names (void)
{
return g_strjoinv ("\n", installed_module_names);
}
diff --git a/src/nautilus-starred-directory.c b/src/nautilus-starred-directory.c
index 7ab92ece4..0fedbfb26 100644
--- a/src/nautilus-starred-directory.c
+++ b/src/nautilus-starred-directory.c
@@ -552,7 +552,7 @@ nautilus_starred_directory_class_init (NautilusFavoriteDirectoryClass *klass)
}
NautilusFavoriteDirectory *
-nautilus_starred_directory_new ()
+nautilus_starred_directory_new (void)
{
NautilusFavoriteDirectory *self;
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 555435e6c..4b550a591 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -544,7 +544,7 @@ nautilus_toolbar_class_init (NautilusToolbarClass *klass)
}
GtkWidget *
-nautilus_toolbar_new ()
+nautilus_toolbar_new (void)
{
return g_object_new (NAUTILUS_TYPE_TOOLBAR,
NULL);
diff --git a/src/nautilus-view-model.c b/src/nautilus-view-model.c
index 71b838af0..0ce806713 100644
--- a/src/nautilus-view-model.c
+++ b/src/nautilus-view-model.c
@@ -276,7 +276,7 @@ on_sorter_changed (GtkSorter *sorter,
}
NautilusViewModel *
-nautilus_view_model_new ()
+nautilus_view_model_new (void)
{
return g_object_new (NAUTILUS_TYPE_VIEW_MODEL, NULL);
}
diff --git a/test/automated/displayless/test-utilities.c b/test/automated/displayless/test-utilities.c
index 1b447fb12..d3bc1cef5 100644
--- a/test/automated/displayless/test-utilities.c
+++ b/test/automated/displayless/test-utilities.c
@@ -3,7 +3,7 @@
static gchar *nautilus_tmp_dir = NULL;
const gchar *
-test_get_tmp_dir ()
+test_get_tmp_dir (void)
{
if (nautilus_tmp_dir == NULL)
{
@@ -14,7 +14,7 @@ test_get_tmp_dir ()
}
void
-test_clear_tmp_dir ()
+test_clear_tmp_dir (void)
{
if (nautilus_tmp_dir != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]