about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-23 00:22:36 -0400
committerJune McEnroe <june@causal.agency>2020-07-23 00:22:36 -0400
commited7d5c0f343c369497062e354e2e8ff043a358f3 (patch)
tree5385a6f182def28da16a601cc1f17e31bcdb3552
parentAdd current topic to tab-complete so it can edited (diff)
downloadtest-ed7d5c0f343c369497062e354e2e8ff043a358f3.tar.gz
test-ed7d5c0f343c369497062e354e2e8ff043a358f3.zip
Initialize numHot, numWarm
For some reason gcc thinks that numWarm might be used uninitialized.
It's fine with numHot though, strangely.
-rw-r--r--ui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index 69eafee..c92fb01 100644
--- a/ui.c
+++ b/ui.c
@@ -928,8 +928,8 @@ static void toggleIgnore(struct Window *window) {
 }
 
 static void showAuto(void) {
-	uint minHot = UINT_MAX, numHot;
-	uint minWarm = UINT_MAX, numWarm;
+	uint minHot = UINT_MAX, numHot = 0;
+	uint minWarm = UINT_MAX, numWarm = 0;
 	for (uint num = 0; num < windows.len; ++num) {
 		struct Window *window = windows.ptrs[num];
 		if (window->heat >= Hot) {
> 2019-05-20Add AuthorityJune McEnroe 2019-05-19Specify precedence of unary versions of operatorsJune McEnroe 2019-05-18Add compound assignment operators to orderJune McEnroe 2019-05-15Support simple assignment in orderJune McEnroe 2019-05-15Implement sizeof in orderJune McEnroe 2019-05-15Add orderJune McEnroe 2019-05-12Add T suffix in bitJune McEnroe 2019-05-10Highlight yacc and lex files as CJune McEnroe Their %-prefixed directives should probably be highlighted Macro. 2019-05-10Use val instead of suboptargJune McEnroe suboptarg doesn't exist in GNU. Hopefully BSD getsubopt also sets val on failure? 2019-05-09Add Parable of the SowerJune McEnroe 2019-05-07Add bit without buildJune McEnroe Need to do some stuff in the Makefile for lex and yacc and generating HTML pages for it. 2019-05-04Fix MANDIR typoJune McEnroe 2019-05-04Move relay to binJune McEnroe