[PATCH:xscope 1/6] Remove/comment out unused variables.
Thomas Klausner
tk at giga.or.at
Tue Dec 7 07:59:13 UTC 2021
---
decodenas.c | 2 +-
print_randr.c | 12 ++++++------
print_render.c | 16 ++++++++--------
printnas.c | 17 +++++++++--------
4 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/decodenas.c b/decodenas.c
index a9cc191..a28efaf 100644
--- a/decodenas.c
+++ b/decodenas.c
@@ -315,7 +315,7 @@ DecodeAudioReply(FD fd, const unsigned char *buf, long n)
void
DecodeAudioError(FD fd, const unsigned char *buf, long n)
{
- short Error = IByte(&buf[1]);
+ // short Error = IByte(&buf[1]);
short Request = 0;
short RequestMinor = 0;
diff --git a/print_randr.c b/print_randr.c
index 5eb3e63..3e39f80 100644
--- a/print_randr.c
+++ b/print_randr.c
@@ -80,9 +80,9 @@ RandrOldGetScreenInfo(FD fd, const unsigned char *buf)
void
RandrOldGetScreenInfoReply(FD fd, const unsigned char *buf)
{
- unsigned short nsize;
- unsigned short nvg;
- unsigned short ngvg;
+ // unsigned short nsize;
+ // unsigned short nvg;
+ // unsigned short ngvg;
PrintField(RBf, 0, 1, REPLY, REPLYHEADER); /* RandrRequest reply */
PrintField(RBf, 1, 1, RANDRREPLY, RANDRREPLYHEADER);
@@ -95,11 +95,11 @@ RandrOldGetScreenInfoReply(FD fd, const unsigned char *buf)
PrintField(buf, 12, 4, TIMESTAMP, "timestamp");
PrintField(buf, 16, 4, TIMESTAMP, "config-timestamp");
PrintField(buf, 20, 2, CARD16, "num-visual-groups");
- nvg = IShort(&buf[20]);
+ // nvg = IShort(&buf[20]);
PrintField(buf, 22, 2, CARD16, "num-groups-of-visual-groups");
- ngvg = IShort(&buf[22]);
+ // ngvg = IShort(&buf[22]);
PrintField(buf, 24, 2, CARD16, "num-sizes");
- nsize = IShort(&buf[24]);
+ // nsize = IShort(&buf[24]);
PrintField(buf, 26, 2, CARD16, "size-id");
PrintField(buf, 28, 2, CARD16, "visual-group-id");
PrintField(buf, 30, 2, CARD16, "rotation");
diff --git a/print_render.c b/print_render.c
index 60db37f..cd834b9 100644
--- a/print_render.c
+++ b/print_render.c
@@ -75,11 +75,11 @@ RenderQueryPictFormats(FD fd, const unsigned char *buf)
void
RenderQueryPictFormatsReply(FD fd, const unsigned char *buf)
{
- long n;
+ // long n;
long f;
- long s;
- long d;
- long v;
+ // long s;
+ // long d;
+ // long v;
PrintField(RBf, 0, 1, REPLY, REPLYHEADER); /* RenderRequest reply */
PrintField(RBf, 1, 1, RENDERREPLY,
@@ -88,11 +88,11 @@ RenderQueryPictFormatsReply(FD fd, const unsigned char *buf)
return;
printfield(buf, 2, 2, CARD16, "sequence number");
printfield(buf, 4, 4, DVALUE4(0), "reply length");
- n = ILong(&buf[4]);
+ // n = ILong(&buf[4]);
f = ILong(&buf[8]);
- s = ILong(&buf[12]);
- d = ILong(&buf[16]);
- v = ILong(&buf[20]);
+ // s = ILong(&buf[12]);
+ // d = ILong(&buf[16]);
+ // v = ILong(&buf[20]);
PrintList(&buf[32], (long) f, PICTFORMINFO, "pict-formats");
}
diff --git a/printnas.c b/printnas.c
index 3207277..d2c5d17 100644
--- a/printnas.c
+++ b/printnas.c
@@ -101,11 +101,13 @@ static void
PrintSuccessfulAudioSetUpReply(const unsigned char *buf)
{
short v;
- short n;
- short m;
+ // short n;
+ // short m;
if (NasVerbose < 1)
return;
+ // m = IByte(&buf[28]);
+ // n = IByte(&buf[29]);
PrintField(buf, 2, 2, CARD16, "protocol-major-version");
PrintField(buf, 4, 2, CARD16, "protocol-minor-version");
printfield(buf, 6, 2, DVALUE2(8 + 2 * n + (v + p + m) / 4),
@@ -119,9 +121,7 @@ PrintSuccessfulAudioSetUpReply(const unsigned char *buf)
v = IShort(&buf[24]);
printfield(buf, 26, 2, CARD16, "maximum-request-length");
printfield(buf, 28, 1, CARD8, "max-tracks");
- m = IByte(&buf[28]);
printfield(buf, 29, 1, DVALUE1(n), "number of audio formats");
- n = IByte(&buf[29]);
PrintField(buf, 30, 1, CARD8, "number of element-types");
PrintField(buf, 31, 1, CARD8, "number of wave-forms");
PrintField(buf, 32, 1, CARD8, "number of actions");
@@ -323,7 +323,7 @@ AudioListDevices(const unsigned char *buf)
void
AudioListDevicesReply(const unsigned char *buf)
{
- long n;
+ // long n;
PrintField(RBf, 0, 1, REPLY, REPLYHEADER); /* GetWindowAttributes */
if (NasVerbose < 1)
@@ -332,7 +332,7 @@ AudioListDevicesReply(const unsigned char *buf)
printfield(buf, 4, 4, CARD32, "reply length");
printfield(buf, 8, 4, CARD32, "num devices");
- n = ILong(&buf[8]);
+ // n = ILong(&buf[8]);
}
static long
@@ -351,7 +351,7 @@ AuString(const unsigned char *buf)
static void
AuDeviceAttributes(const unsigned char *buf)
{
- int l;
+ // int l;
printfield(buf, 0, 4, CARD32, "value mask");
printfield(buf, 4, 4, CARD32, "changeable mask");
@@ -362,7 +362,8 @@ AuDeviceAttributes(const unsigned char *buf)
printfield(buf, 15, 1, CARD8, "num tracks");
printfield(buf, 16, 4, CARD32, "access");
- l = 20 + AuString(&buf[20]);
+ // l = 20 + AuString(&buf[20]);
+ (void)AuString(&buf[20]);
}
void
--
2.34.1
More information about the xorg-devel
mailing list