From 99cef446d1f6491ff0ff7abc6ccb4a11d2c73447 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 7 Mar 2012 21:24:27 +0100 Subject: [PATCH] Portability: Don't assume unsetenv has a non-void return type --- ccache.h | 2 +- util.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ccache.h b/ccache.h index 53788e52f..7e258834f 100644 --- a/ccache.h +++ b/ccache.h @@ -123,7 +123,7 @@ char *x_strndup(const char *s, size_t n); void *x_malloc(size_t size); void *x_calloc(size_t nmemb, size_t size); void *x_realloc(void *ptr, size_t size); -int x_unsetenv(const char *name); +void x_unsetenv(const char *name); void traverse(const char *dir, void (*fn)(const char *, struct stat *)); char *basename(const char *path); char *dirname(const char *path); diff --git a/util.c b/util.c index 1d473ac5e..ed884d100 100644 --- a/util.c +++ b/util.c @@ -680,12 +680,12 @@ x_realloc(void *ptr, size_t size) } /* This is like unsetenv. */ -int x_unsetenv(const char *name) +void x_unsetenv(const char *name) { #ifdef HAVE_UNSETENV - return unsetenv(name); + unsetenv(name); #else - return putenv(x_strdup(name)); /* Leak to environment. */ + putenv(x_strdup(name)); /* Leak to environment. */ #endif } -- 2.47.3