strtok_r has prototyped pointer of different width?



Hello group,

consider this code on x86_64, gcc 4.1.2

#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>

int main(int argc, char **argv) {
char x[123];
const char *delim = "abcd";
char *token;
char *saveptr;

strcpy(x, "foobar");
token = strtok_r(x, delim, &saveptr);
return 0;
}

Which, compiled with

gcc -O2 -Wall -Wextra -Wformat-nonliteral -Wcast-align -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wconversion -Wwrite-strings -o foo foo.c

Yields (among argc/argv unused) the following warning:

foo.c:13: warning: passing argument 2 of ‘__strtok_r_1c’ with different width due to prototype

I've found no explanation - why is that?

Regards,
Johannes

--
"PS: Ein Realname wäre nett. Ich selbst nutze nur keinen, weil mich die
meisten hier bereits mit Namen kennen." -- Markus Gronotte aka Makus /
Kosst Amojan / maqqusz / Mr. G / Ferdinand Simpson / Quartillia
Rosenberg in dse <45608268$0$5719$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
.



Relevant Pages