summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-05-31 21:41:17 +0000
committernicm <nicm@openbsd.org>2019-05-31 21:41:17 +0000
commit337db08581156719af9b9e6f0985f10f09733869 (patch)
tree02fcb269de5ef625a688f724791ce8f4207adef3
parentdocument the newer PERMIT_PACKAGE framework (diff)
downloadwireguard-openbsd-337db08581156719af9b9e6f0985f10f09733869.tar.xz
wireguard-openbsd-337db08581156719af9b9e6f0985f10f09733869.zip
Fix warnings, from Ben Boeckel.
-rw-r--r--usr.bin/tmux/cmd-queue.c4
-rw-r--r--usr.bin/tmux/format.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c
index dee7ab92cb1..a1683aa35fb 100644
--- a/usr.bin/tmux/cmd-queue.c
+++ b/usr.bin/tmux/cmd-queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-queue.c,v 1.72 2019/05/29 19:34:42 nicm Exp $ */
+/* $OpenBSD: cmd-queue.c,v 1.73 2019/05/31 21:41:17 nicm Exp $ */
/*
* Copyright (c) 2013 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -202,7 +202,7 @@ cmdq_get_command(struct cmd_list *cmdlist, struct cmd_find_state *current,
{
struct cmdq_item *item, *first = NULL, *last = NULL;
struct cmd *cmd;
- struct cmdq_shared *shared;
+ struct cmdq_shared *shared = NULL;
u_int group = 0;
TAILQ_FOREACH(cmd, &cmdlist->list, qentry) {
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index d788766c6f0..bdc7e65a708 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.200 2019/05/28 07:18:42 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.201 2019/05/31 21:41:17 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1502,7 +1502,7 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen,
char **buf, size_t *len, size_t *off)
{
struct window_pane *wp = ft->wp;
- const char *errptr, *copy, *cp, *marker;
+ const char *errptr, *copy, *cp, *marker = NULL;
char *copy0, *condition, *found, *new;
char *value, *left, *right;
size_t valuelen;
@@ -1550,8 +1550,6 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen,
limit = 0;
if (fm->argc == 2 && fm->argv[1] != NULL)
marker = fm->argv[1];
- else
- marker = NULL;
break;
case 'l':
modifiers |= FORMAT_LITERAL;