aboutsummaryrefslogtreecommitdiffstats
path: root/src/coopgammad.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-16 11:10:10 +0200
committerMattias Andrée <maandree@kth.se>2016-07-16 11:10:10 +0200
commit73f545ac0fa167aa71b1d0f78de533cf4d5978ef (patch)
tree4942d780580622c65e276d3cfb50a1aa5274dd3e /src/coopgammad.c
parentm (diff)
downloadcoopgammad-73f545ac0fa167aa71b1d0f78de533cf4d5978ef.tar.gz
coopgammad-73f545ac0fa167aa71b1d0f78de533cf4d5978ef.tar.bz2
coopgammad-73f545ac0fa167aa71b1d0f78de533cf4d5978ef.tar.xz
Fix warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/coopgammad.c')
-rw-r--r--src/coopgammad.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/coopgammad.c b/src/coopgammad.c
index 58f0165..a4ed5a7 100644
--- a/src/coopgammad.c
+++ b/src/coopgammad.c
@@ -45,6 +45,24 @@
+extern char* argv0;
+extern char* argv0_real;
+extern struct output* outputs;
+extern size_t outputs_n;
+extern int socketfd;
+extern char* pidpath;
+extern char* socketpath;
+extern int gerror;
+extern int method;
+extern char* sitename;
+extern libgamma_site_state_t site;
+extern libgamma_partition_state_t* partitions;
+extern libgamma_crtc_state_t* crtcs;
+extern volatile sig_atomic_t reexec;
+extern volatile sig_atomic_t terminate;
+
+
+
/**
* The name of the process
*/
@@ -908,6 +926,13 @@ static void destroy(int full)
}
+
+#if defined(__clang__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wcast-align"
+#endif
+
+
/**
* Marshal the state of the process
*
@@ -1056,6 +1081,12 @@ static size_t unmarshal(void* buf)
}
+#if defined(__clang__)
+# pragma GCC diagnostic pop
+#endif
+
+
+
/**
* Unmarshal the state of the process and merge with new state
*
@@ -1231,6 +1262,9 @@ static int print_method_and_site(int query)
/**
* Print usage information and exit
*/
+#if defined(__GNU__) || defined(__clang__)
+__attribute__((noreturn))
+#endif
static void usage(void)
{
printf("Usage: %s [-m method] [-s site] [-fkpq]\n", argv0);
@@ -1238,6 +1272,11 @@ static void usage(void)
}
+#if defined(__clang__)
+# pragma GCC diagnostic ignored "-Wdocumentation-unknown-command"
+#endif
+
+
/**
* Must not be started without stdin, stdout, or stderr (may be /dev/null)
*