/* "Action" handlers called when a file descriptor is matched. */
-static char *pre_string;
+static char const *pre_string;
static size_t pre_string_size;
-static char *post_string;
+static char const *post_string;
static size_t post_string_size;
/* Load alternative pre/post strings from the environment if available, fall
* back to default values. */
-inline static void init_pre_post_string() {
+inline static void init_pre_post_string(void) {
pre_string = getenv(ENV_NAME_PRE_STRING);
if (!pre_string) {
pre_string = DEFAULT_PRE_STRING;
/* Count arguments. */ \
size_t count = 1; /* arg */ \
va_start(ap, arg); \
- while (va_arg(ap, const char *)) { \
+ while (va_arg(ap, char const *)) { \
count++; \
} \
va_end(ap); \
static void warning(char const *format, ...) {
va_list ap;
- char *home = getenv("HOME");
+ char const *home = getenv("HOME");
if (!home) {
return;
}
int main(int argc, char **argv) {
+ (void)argv;
+
fprintf(stderr, "write to stderr: %d\n", argc);
printf("write to stdout\n");
fflush(stdout);