As Tom Lane pointed out, it could defeat the compiler's printf() format
string verification.
Backpatch to v12, like that patch that introduced it.
Discussion: https://www.postgresql.org/message-id/
1069283.
1597672779%40sss.pgh.pa.us
* Stay on the same line if reporting to a terminal and we're not done
* yet.
*/
- fprintf(stderr, (!finished && isatty(fileno(stderr))) ? "\r" : "\n");
+ fputc((!finished && isatty(fileno(stderr))) ? '\r' : '\n', stderr);
}
static int32
* Stay on the same line if reporting to a terminal and we're not done
* yet.
*/
- fprintf(stderr, (!finished && isatty(fileno(stderr))) ? "\r" : "\n");
+ fputc((!finished && isatty(fileno(stderr))) ? '\r' : '\n', stderr);
}
static bool
* Stay on the same line if reporting to a terminal and we're not done
* yet.
*/
- fprintf(stderr, (!finished && isatty(fileno(stderr))) ? "\r" : "\n");
+ fputc((!finished && isatty(fileno(stderr))) ? '\r' : '\n', stderr);
}
/*