Commit d50d2847 authored by Vincent Pelletier's avatar Vincent Pelletier

Get rid of workaround casts for ANSI C warnings.

Also, drop -pedantic to avoid related warnings.
parent c16563f2
CFLAGS=-Wall --pedantic
CFLAGS=-Wall
all: libuserhosts.so
......
......@@ -47,8 +47,8 @@ static inline void *dlsym_or_abort(const char *name) {
}
static void __attribute__ ((constructor)) init(void) {
*(void **)(&original_open) = dlsym_or_abort("open");
*(void **)(&original_fopen) = dlsym_or_abort("fopen");
original_open = dlsym_or_abort("open");
original_fopen = dlsym_or_abort("fopen");
replacement_hosts = getenv("HOSTS");
if (replacement_hosts == NULL)
/* XXX: warn ? fallback on $HOME/???/hosts ? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment