aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-11-27 09:42:24 -0500
committerDrew DeVault <sir@cmpwn.com>2015-11-27 09:42:24 -0500
commit5ae359279ba2b72acc93c907c31850e16d10b358 (patch)
tree9139dd62e465d920d19cf336b309d8099070cb4d
parentd95447fdd9401e971c5dfab69dd825c2cc67e597 (diff)
downloadsway-5ae359279ba2b72acc93c907c31850e16d10b358.tar.xz
Fix build warnings
-rw-r--r--swaybg/main.c2
-rw-r--r--swaymsg/main.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/swaybg/main.c b/swaybg/main.c
index 3b344079..ff16a54e 100644
--- a/swaybg/main.c
+++ b/swaybg/main.c
@@ -62,7 +62,7 @@ int main(int argc, const char **argv) {
double height = cairo_image_surface_get_height(image);
const char *scaling_mode_str = argv[3];
- enum scaling_mode scaling_mode;
+ enum scaling_mode scaling_mode = SCALING_MODE_STRETCH;
if (strcmp(scaling_mode_str, "stretch") == 0) {
scaling_mode = SCALING_MODE_STRETCH;
} else if (strcmp(scaling_mode_str, "fill") == 0) {
diff --git a/swaymsg/main.c b/swaymsg/main.c
index 9c799b54..ea8e0a55 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -133,7 +133,7 @@ int main(int argc, char **argv) {
}
}
- uint32_t type;
+ uint32_t type = IPC_COMMAND;
if (strcasecmp(cmdtype, "command") == 0) {
type = IPC_COMMAND;
@@ -149,6 +149,8 @@ int main(int argc, char **argv) {
type = IPC_GET_BAR_CONFIG;
} else if (strcasecmp(cmdtype, "get_version") == 0) {
type = IPC_GET_VERSION;
+ } else {
+ sway_abort("Unknown message type %s", cmdtype);
}
free(cmdtype);