diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-05-08 16:35:47 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-05-08 16:47:20 -0700 |
commit | 1e48aad532aa19a35efbee24cddca4c43e02afe7 (patch) | |
tree | 1269e95e82a72a1d31f90a4de67b67d6f21a1e13 | |
parent | dd2a2e7dc918c57aae3df57118042e4362377243 (diff) |
Dead code removal
Removing the redundant setting of format = 32 in the XA_ATOM case.
It was already set to that earlier whe it was assigned actual_format.
xrandr.c:2770:3: warning: Value stored to 'format' is never read
format=0;
^ ~
xrandr.c:2782:7: warning: Value stored to 'format' is never read
format = actual_format;
^ ~~~~~~~~~~~~~
Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | xrandr.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -2755,7 +2755,7 @@ main (int argc, char **argv) { Atom name = XInternAtom (dpy, prop->name, False); Atom type; - int format; + int format = 0; unsigned char *data; int nelements; int int_value; @@ -2767,7 +2767,6 @@ main (int argc, char **argv) XRRPropertyInfo *propinfo; type = AnyPropertyType; - format=0; if (XRRGetOutputProperty (dpy, output->output.xid, name, 0, 100, False, False, @@ -2797,7 +2796,6 @@ main (int argc, char **argv) ulong_value = XInternAtom (dpy, prop->value, False); data = (unsigned char *) &ulong_value; nelements = 1; - format = 32; } else if ((type == XA_STRING || type == AnyPropertyType)) { |