widget/yaft: silence compiler warnings

This commit is contained in:
Jacek Jendrzej
2020-01-09 13:29:57 +01:00
parent eef536a737
commit 19b9a05893
3 changed files with 7 additions and 6 deletions

View File

@@ -298,16 +298,17 @@ void YaFT_p::status_report(struct parm_t *parm)
{
int i, num;
char buf[BUFSIZE];
ssize_t ignored __attribute__((unused));
for (i = 0; i < parm->argc; i++) {
num = dec2num(parm->argv[i]);
if (num == 5) { /* terminal response: ready */
write(fd, "\033[0n", 4);
ignored = write(fd, "\033[0n", 4);
} else if (num == 6) { /* cursor position report */
snprintf(buf, BUFSIZE, "\033[%d;%dR", cursor.y + 1, cursor.x + 1);
write(fd, buf, strlen(buf));
ignored = write(fd, buf, strlen(buf));
} else if (num == 15) { /* terminal response: printer not connected */
write(fd, "\033[?13n", 6);
ignored = write(fd, "\033[?13n", 6);
}
}
}
@@ -316,7 +317,7 @@ void YaFT_p::device_attribute(struct parm_t *parm)
{
if (parm->argc > 0 && dec2num(parm->argv[0]))
return; /* compatibility with linux console */
write(fd, "\033[?6c", 5); /* "I am a VT102" */
ssize_t ignored __attribute__((unused)) = write(fd, "\033[?6c", 5); /* "I am a VT102" */
}
void YaFT_p::set_mode(struct parm_t *parm)

View File

@@ -96,7 +96,7 @@ void YaFT_p::reverse_nl(void)
void YaFT_p::identify(void)
{
write(fd, "\033[?6c", 5); /* "I am a VT102" */
ssize_t ignored __attribute__((unused)) = write(fd, "\033[?6c", 5); /* "I am a VT102" */
}
void YaFT_p::enter_csi(void)

View File

@@ -177,7 +177,7 @@ void YaFT_p::set_palette(struct parm_t *pt)
snprintf(buf, BUFSIZE, "\033]4;%d;rgb:%.2X/%.2X/%.2X\033\\",
index, rgb[0], rgb[1], rgb[2]);
write(fd, buf, strlen(buf));
ssize_t ignored __attribute__((unused)) = write(fd, buf, strlen(buf));
}
}