Skip to content

Commit ab3d729

Browse files
authored
Merge pull request #1 from aqnya/main
make clang happy
2 parents f40ecd2 + 59f4986 commit ab3d729

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

cprintf.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ char *cprintf_regen_format__(const char *f)
6666
*/
6767
char *ret = strdup(cprintf_avoid_null__(f));
6868
int j = 0;
69-
int count = 0;
7069
size_t len = cprintf_strlen__(f);
7170
if (len == 0) {
7271
cprintf_mark_buf__(ret);
@@ -78,7 +77,6 @@ char *cprintf_regen_format__(const char *f)
7877
ret[j + 1] = 's';
7978
j += 2;
8079
i++;
81-
count++;
8280
} else {
8381
ret[j] = f[i];
8482
j++;
@@ -373,7 +371,7 @@ static char *get_bg_color__(void)
373371
// Don't ask me why, idk QwQ
374372
cfmakeraw(&new_termios);
375373
tcsetattr(STDERR_FILENO, TCSANOW, &new_termios);
376-
write(STDERR_FILENO, "\e]11;?\a", strlen("\e]11;?\a"));
374+
write(STDERR_FILENO, "\x1b]11;?\a", strlen("\x1b]11;?\a"));
377375
char buf[128];
378376
buf[0] = '\0';
379377
// Don't ask me why, idk QwQ
@@ -412,7 +410,7 @@ static char *get_bg_color__(void)
412410
}
413411
p += strlen("rgb:");
414412
char *ret = malloc(32);
415-
for (int i = 0; i < strlen(p); i++) {
413+
for (size_t i = 0; i < strlen(p); i++) {
416414
if (p[i] >= 32 && p[i] <= 126) {
417415
ret[j++] = p[i];
418416
ret[j] = '\0';

0 commit comments

Comments
 (0)