Lines 4467-4475
static void whack_terminal (void) {
Link Here
|
4467 |
static void win_names (WIN_t *q, const char *name) { |
4467 |
static void win_names (WIN_t *q, const char *name) { |
4468 |
/* note: sprintf/snprintf results are "undefined" when src==dst, |
4468 |
/* note: sprintf/snprintf results are "undefined" when src==dst, |
4469 |
according to C99 & POSIX.1-2001 (thanks adc) */ |
4469 |
according to C99 & POSIX.1-2001 (thanks adc) */ |
|
|
4470 |
#pragma GCC diagnostic push |
4471 |
#pragma GCC diagnostic warning "-Wformat-truncation" |
4470 |
if (q->rc.winname != name) |
4472 |
if (q->rc.winname != name) |
4471 |
snprintf(q->rc.winname, sizeof(q->rc.winname), "%s", name); |
4473 |
snprintf(q->rc.winname, sizeof(q->rc.winname), "%s", name); |
4472 |
snprintf(q->grpname, sizeof(q->grpname), "%d:%s", q->winnum, name); |
4474 |
snprintf(q->grpname, sizeof(q->grpname), "%d:%s", q->winnum, name); |
|
|
4475 |
#pragma GCC diagnostic pop |
4473 |
} // end: win_names |
4476 |
} // end: win_names |
4474 |
|
4477 |
|
4475 |
|
4478 |
|