commit 8129cbeb62ba0fa159597137dc19e97d36dcce56 Author: Ryan C. Gordon Date: Wed Aug 2 02:41:03 2017 -0400 Valgrind fix for XStoreColor and XStoreColors. If the "pad" field isn't set, Valgrind will report it as uninitialized memory accesses when the struct is copied into the Display's send buffer. In practice, this is (probably) harmless, but Valgrind is correct in believing it's a bug. diff --git a/src/StColor.c b/src/StColor.c index d5a217fb..221fae13 100644 --- a/src/StColor.c +++ b/src/StColor.c @@ -50,6 +50,7 @@ XStoreColor( citem->green = def->green; citem->blue = def->blue; citem->flags = def->flags; /* do_red, do_green, do_blue */ + citem->pad = 0; UnlockDisplay(dpy); diff --git a/src/StColors.c b/src/StColors.c index 17a215cc..fa1814c8 100644 --- a/src/StColors.c +++ b/src/StColors.c @@ -53,6 +53,7 @@ XStoreColors( citem.green = defs[i].green; citem.blue = defs[i].blue; citem.flags = defs[i].flags; + citem.pad = 0; /* note that xColorItem doesn't contain all 16-bit quantities, so we can't use Data16 */