[gnome-builder] build: enable -Wmissing-declarations for libide
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build: enable -Wmissing-declarations for libide
- Date: Sat, 16 Jun 2018 05:13:14 +0000 (UTC)
commit 342855f8f757b9d2c90fd851ee5d684f88a5e5e4
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 15 22:08:55 2018 -0700
build: enable -Wmissing-declarations for libide
meson.build | 6 +++++
src/libide/buildconfig/ide-buildconfig-plugin.c | 8 +++---
src/libide/buildui/ide-build-plugin.c | 10 +++----
src/libide/debugger/ide-debugger-plugin.c | 6 ++---
src/libide/directory/ide-directory-plugin.c | 8 +++---
src/libide/editor/ide-editor-plugin.c | 8 +++---
src/libide/object-modules.h | 35 +++++++++++++++++++++++++
src/libide/testing/testing-plugin.c | 10 ++++---
src/libide/webkit/ide-webkit.c | 5 ++--
9 files changed, 66 insertions(+), 30 deletions(-)
---
diff --git a/meson.build b/meson.build
index 4db18b933..26759c269 100644
--- a/meson.build
+++ b/meson.build
@@ -104,6 +104,8 @@ add_global_arguments([
'-DIDE_COMPILATION',
], language: 'c')
+libide_args = []
+
cc = meson.get_compiler('c')
global_c_args = []
test_c_args = [
@@ -173,6 +175,10 @@ foreach arg: test_c_args
endif
endforeach
+if cc.has_multi_arguments('-Wmissing-declarations')
+ libide_args += '-Wmissing-declarations'
+endif
+
# Detect and set symbol visibility
hidden_visibility_args = []
if get_option('default_library') != 'static'
diff --git a/src/libide/buildconfig/ide-buildconfig-plugin.c b/src/libide/buildconfig/ide-buildconfig-plugin.c
index 565e91093..cb82def32 100644
--- a/src/libide/buildconfig/ide-buildconfig-plugin.c
+++ b/src/libide/buildconfig/ide-buildconfig-plugin.c
@@ -16,20 +16,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define G_LOG_DOMAIN "ide-buildsystem-plugin"
-
#include "config.h"
-#include <libpeas/peas.h>
+#define G_LOG_DOMAIN "ide-buildsystem-plugin"
-#include "ide-version-macros.h"
+#include "object-modules.h"
#include "buildconfig/ide-buildconfig-configuration-provider.h"
#include "buildconfig/ide-buildconfig-pipeline-addin.h"
#include "buildsystem/ide-build-pipeline-addin.h"
#include "config/ide-configuration-provider.h"
-_IDE_EXTERN void
+void
ide_buildconfig_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
diff --git a/src/libide/buildui/ide-build-plugin.c b/src/libide/buildui/ide-build-plugin.c
index 14e08b7fd..d31691c4e 100644
--- a/src/libide/buildui/ide-build-plugin.c
+++ b/src/libide/buildui/ide-build-plugin.c
@@ -16,18 +16,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define G_LOG_DOMAIN "ide-build-plugin"
-
#include "config.h"
-#include <libpeas/peas.h>
+#define G_LOG_DOMAIN "ide-build-plugin"
-#include "ide-version-macros.h"
+#include "object-modules.h"
-#include "workbench/ide-workbench-addin.h"
#include "buildui/ide-build-workbench-addin.h"
+#include "workbench/ide-workbench-addin.h"
-_IDE_EXTERN void
+void
ide_build_tool_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
diff --git a/src/libide/debugger/ide-debugger-plugin.c b/src/libide/debugger/ide-debugger-plugin.c
index 319b4e6d5..956bf1492 100644
--- a/src/libide/debugger/ide-debugger-plugin.c
+++ b/src/libide/debugger/ide-debugger-plugin.c
@@ -18,15 +18,15 @@
#include "config.h"
-#include <libpeas/peas.h>
+#define G_LOG_DOMAIN "ide-debugger-plugin"
-#include "ide-version-macros.h"
+#include "object-modules.h"
#include "debugger/ide-debugger-editor-addin.h"
#include "editor/ide-editor-addin.h"
#include "editor/ide-editor-view-addin.h"
-_IDE_EXTERN void
+void
ide_debugger_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
diff --git a/src/libide/directory/ide-directory-plugin.c b/src/libide/directory/ide-directory-plugin.c
index cc88df62d..f654dc644 100644
--- a/src/libide/directory/ide-directory-plugin.c
+++ b/src/libide/directory/ide-directory-plugin.c
@@ -16,17 +16,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define G_LOG_DOMAIN "ide-directory-plugin"
-
#include "config.h"
-#include <libpeas/peas.h>
+#define G_LOG_DOMAIN "ide-directory-plugin"
+
+#include "object-modules.h"
#include "buildsystem/ide-build-system.h"
#include "directory/ide-directory-build-system.h"
#include "directory/ide-directory-vcs.h"
-_IDE_EXTERN void
+void
ide_directory_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module,
diff --git a/src/libide/editor/ide-editor-plugin.c b/src/libide/editor/ide-editor-plugin.c
index 3b8444997..d7435f3c1 100644
--- a/src/libide/editor/ide-editor-plugin.c
+++ b/src/libide/editor/ide-editor-plugin.c
@@ -16,18 +16,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define G_LOG_DOMAIN "ide-editor-plugin"
-
#include "config.h"
-#include <libpeas/peas.h>
+#define G_LOG_DOMAIN "ide-editor-plugin"
-#include "ide-version-macros.h"
+#include "object-modules.h"
#include "editor/ide-editor-layout-stack-addin.h"
#include "editor/ide-editor-workbench-addin.h"
-_IDE_EXTERN void
+void
ide_editor_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module, IDE_TYPE_LAYOUT_STACK_ADDIN,
IDE_TYPE_EDITOR_LAYOUT_STACK_ADDIN);
diff --git a/src/libide/object-modules.h b/src/libide/object-modules.h
new file mode 100644
index 000000000..1e95d0772
--- /dev/null
+++ b/src/libide/object-modules.h
@@ -0,0 +1,35 @@
+/* object-modules.h
+ *
+ * Copyright © 2018 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <libpeas/peas.h>
+
+#include "ide-version-macros.h"
+
+G_BEGIN_DECLS
+
+_IDE_EXTERN void ide_build_tool_register_types (PeasObjectModule *module);
+_IDE_EXTERN void ide_buildconfig_register_types (PeasObjectModule *module);
+_IDE_EXTERN void ide_debugger_register_types (PeasObjectModule *module);
+_IDE_EXTERN void ide_directory_register_types (PeasObjectModule *module);
+_IDE_EXTERN void ide_editor_register_types (PeasObjectModule *module);
+_IDE_EXTERN void ide_test_register_types (PeasObjectModule *module);
+_IDE_EXTERN void ide_webkit_register_types (PeasObjectModule *module);
+
+G_END_DECLS
diff --git a/src/libide/testing/testing-plugin.c b/src/libide/testing/testing-plugin.c
index c57a30f44..82042778d 100644
--- a/src/libide/testing/testing-plugin.c
+++ b/src/libide/testing/testing-plugin.c
@@ -18,15 +18,17 @@
#include "config.h"
-#include <libpeas/peas.h>
+#define G_LOG_DOMAIN "testing-plugin"
-#include "ide-version-macros.h"
+#include "object-modules.h"
#include "editor/ide-editor-addin.h"
#include "testing/ide-test-editor-addin.h"
-_IDE_EXTERN void
+void
ide_test_register_types (PeasObjectModule *module)
{
- peas_object_module_register_extension_type (module, IDE_TYPE_EDITOR_ADDIN, IDE_TYPE_TEST_EDITOR_ADDIN);
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_EDITOR_ADDIN,
+ IDE_TYPE_TEST_EDITOR_ADDIN);
}
diff --git a/src/libide/webkit/ide-webkit.c b/src/libide/webkit/ide-webkit.c
index c605ffe46..bf7d27280 100644
--- a/src/libide/webkit/ide-webkit.c
+++ b/src/libide/webkit/ide-webkit.c
@@ -18,12 +18,11 @@
#include "config.h"
-#include <libpeas/peas.h>
#include <webkit2/webkit2.h>
-#include "ide-version-macros.h"
+#include "object-modules.h"
-_IDE_EXTERN void
+void
ide_webkit_register_types (PeasObjectModule *module)
{
g_type_ensure (WEBKIT_TYPE_WEB_VIEW);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]