summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2023-04-28 11:12:47 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2023-05-02 08:59:25 +1000
commit0f1541e1e5bd57686edf95c3532544556ed370bb (patch)
tree84d8a06f9a1087e3535e9c6aad375bf50f6fc561
parent826215af0cc46b19555063b8894de6781d4c5993 (diff)
Initialize a few stack vars to zero
Modified version of the patch from #4 Fixes #4 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/XChgFCtl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/XChgFCtl.c b/src/XChgFCtl.c
index d5ec8dc..fd4ff39 100644
--- a/src/XChgFCtl.c
+++ b/src/XChgFCtl.c
@@ -86,7 +86,7 @@ XChangeFeedbackControl(
if (f->class == KbdFeedbackClass) {
XKbdFeedbackControl *K;
- xKbdFeedbackCtl k;
+ xKbdFeedbackCtl k = {0};
K = (XKbdFeedbackControl *) f;
k.class = KbdFeedbackClass;
@@ -106,7 +106,7 @@ XChangeFeedbackControl(
Data(dpy, (char *)&k, length);
} else if (f->class == PtrFeedbackClass) {
XPtrFeedbackControl *P;
- xPtrFeedbackCtl p;
+ xPtrFeedbackCtl p = {0};
P = (XPtrFeedbackControl *) f;
p.class = PtrFeedbackClass;
@@ -121,7 +121,7 @@ XChangeFeedbackControl(
Data(dpy, (char *)&p, length);
} else if (f->class == IntegerFeedbackClass) {
XIntegerFeedbackControl *I;
- xIntegerFeedbackCtl i;
+ xIntegerFeedbackCtl i = {0};
I = (XIntegerFeedbackControl *) f;
i.class = IntegerFeedbackClass;
@@ -134,7 +134,7 @@ XChangeFeedbackControl(
Data(dpy, (char *)&i, length);
} else if (f->class == StringFeedbackClass) {
XStringFeedbackControl *S;
- xStringFeedbackCtl s;
+ xStringFeedbackCtl s = {0};
S = (XStringFeedbackControl *) f;
s.class = StringFeedbackClass;
@@ -149,7 +149,7 @@ XChangeFeedbackControl(
Data(dpy, (char *)S->syms_to_display, length);
} else if (f->class == BellFeedbackClass) {
XBellFeedbackControl *B;
- xBellFeedbackCtl b;
+ xBellFeedbackCtl b = {0};
B = (XBellFeedbackControl *) f;
b.class = BellFeedbackClass;
@@ -164,7 +164,7 @@ XChangeFeedbackControl(
Data(dpy, (char *)&b, length);
} else if (f->class == LedFeedbackClass) {
XLedFeedbackControl *L;
- xLedFeedbackCtl l;
+ xLedFeedbackCtl l = {0};
L = (XLedFeedbackControl *) f;
l.class = LedFeedbackClass;
@@ -177,7 +177,7 @@ XChangeFeedbackControl(
length <<= 2;
Data(dpy, (char *)&l, length);
} else {
- xFeedbackCtl u;
+ xFeedbackCtl u = {0};
u.class = f->class;
u.length = f->length - sizeof(int);