Skip to content
Snippets Groups Projects
Commit 8c3c378a authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

meson: Make missing declarations an error

Detects missing includes and missing static defitions
parent 97e8e3d5
No related branches found
No related tags found
1 merge request!100Enable more compile warnings
...@@ -39,6 +39,7 @@ test_c_args = [ ...@@ -39,6 +39,7 @@ test_c_args = [
'-Wcast-align', '-Wcast-align',
'-Wdeclaration-after-statement', '-Wdeclaration-after-statement',
['-Werror=format-security', '-Werror=format=2'], ['-Werror=format-security', '-Werror=format=2'],
'-Werror=missing-declarations',
'-Wformat-nonliteral', '-Wformat-nonliteral',
'-Wformat-security', '-Wformat-security',
'-Wmaybe-uninitialized', '-Wmaybe-uninitialized',
......
...@@ -63,7 +63,7 @@ pam_conversation_cb(int num_msg, const struct pam_message **msg, ...@@ -63,7 +63,7 @@ pam_conversation_cb(int num_msg, const struct pam_message **msg,
/* return TRUE if pin is correct, FALSE otherwise */ /* return TRUE if pin is correct, FALSE otherwise */
gboolean static gboolean
authenticate (PhoshAuth *self, const gchar* number) authenticate (PhoshAuth *self, const gchar* number)
{ {
PhoshAuthPrivate *priv = phosh_auth_get_instance_private (self); PhoshAuthPrivate *priv = phosh_auth_get_instance_private (self);
......
...@@ -128,7 +128,7 @@ show_unlock_page (PhoshLockscreen *self) ...@@ -128,7 +128,7 @@ show_unlock_page (PhoshLockscreen *self)
/* callback of async auth task */ /* callback of async auth task */
void static void
auth_async_cb (PhoshAuth *auth, GAsyncResult *result, PhoshLockscreen *self) auth_async_cb (PhoshAuth *auth, GAsyncResult *result, PhoshLockscreen *self)
{ {
PhoshLockscreenPrivate *priv; PhoshLockscreenPrivate *priv;
......
...@@ -646,7 +646,7 @@ phosh_shell_get_default (void) ...@@ -646,7 +646,7 @@ phosh_shell_get_default (void)
} }
gboolean static gboolean
sigterm_cb (gpointer unused) sigterm_cb (gpointer unused)
{ {
g_debug ("Cleaning up"); g_debug ("Cleaning up");
......
...@@ -44,12 +44,6 @@ typedef struct _PhoshSettings ...@@ -44,12 +44,6 @@ typedef struct _PhoshSettings
G_DEFINE_TYPE_WITH_PRIVATE (PhoshSettings, phosh_settings, GTK_TYPE_WINDOW) G_DEFINE_TYPE_WITH_PRIVATE (PhoshSettings, phosh_settings, GTK_TYPE_WINDOW)
GtkWidget *phosh_settings (const char* name)
{
return g_object_new (PHOSH_TYPE_SETTINGS, "name", name, NULL);
}
static void static void
brightness_value_changed_cb (GtkScale *scale_brightness, gpointer *unused) brightness_value_changed_cb (GtkScale *scale_brightness, gpointer *unused)
{ {
......
...@@ -10,11 +10,14 @@ ...@@ -10,11 +10,14 @@
#include <gio/gio.h> #include <gio/gio.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "settings/brightness.h"
GDBusProxy *brightness_proxy; GDBusProxy *brightness_proxy;
gboolean setting_brightness; gboolean setting_brightness;
void static void
brightness_changed_cb (GDBusProxy *proxy, brightness_changed_cb (GDBusProxy *proxy,
GVariant *changed_props, GVariant *changed_props,
GVariant *invalidated_props, GVariant *invalidated_props,
...@@ -85,7 +88,7 @@ brightness_init (GtkScale *scale) ...@@ -85,7 +88,7 @@ brightness_init (GtkScale *scale)
void static void
brightness_set_cb (GDBusProxy *proxy, GAsyncResult *res, gpointer unused) brightness_set_cb (GDBusProxy *proxy, GAsyncResult *res, gpointer unused)
{ {
GError *err = NULL; GError *err = NULL;
......
...@@ -104,7 +104,7 @@ phosh_wwan_mm_update_signal_quality (PhoshWWanMM *self) ...@@ -104,7 +104,7 @@ phosh_wwan_mm_update_signal_quality (PhoshWWanMM *self)
} }
const char * static const char *
user_friendly_access_tec (guint access_tec) user_friendly_access_tec (guint access_tec)
{ {
switch (access_tec) { switch (access_tec) {
......
/* Stubs so we don't need to run the shell */ /* Stubs so we don't need to run the shell */
#include <glib.h> #include <glib.h>
#include "phosh-wayland.h"
#include "phosh.h"
gpointer gpointer
phosh_shell_get_default (void) phosh_shell_get_default (void)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment