summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-02-22 21:22:43 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-02-22 21:22:43 -0800
commitda0682051e880faa2ef1accac388040bb52b46d8 (patch)
tree04182368201f4be4616fa538c3e699059d88d1c0
parent65f010b8c4ef0e4fa5fc6a0679173f81c7a4b626 (diff)
Use correct variable for printing current opacity
Found by clang: transSet.c:303:30: warning: variable 'opacity' is uninitialized when used here [-Wuninitialized] (double) opacity / OPAQUE); ^~~~~~~ When running transset -v, it prints the current opacity of a window before changing it, but was printing garbage - after this fix, correctly prints the value set by the previous run. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--transSet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transSet.c b/transSet.c
index 7cfbe51..d915d41 100644
--- a/transSet.c
+++ b/transSet.c
@@ -300,7 +300,7 @@ main (int argc, char **argv)
XFree ((void *) data);
if (flag_verbose)
printf ("Found transparency: %g\n",
- (double) opacity / OPAQUE);
+ (double) current_opacity / OPAQUE);
} else
current_opacity = OPAQUE;