MinGW make type warning in unit-test-server.c #180

Closed
ghost opened this Issue Dec 10, 2013 · 0 comments

Comments

Projects
None yet
0 participants
@ghost

ghost commented Dec 10, 2013

when compiling the newest libmodbus master branch
with the newest MinGW (GCC 4.8.1) on Win7 via the steps:

autogen.sh
./configure
make

make warns:

unit-test-server.c:205:21: warning: pointer targets in passing
argument 2 of 'send' differ in signedness [-Wpointer-sign]
        send(w_s, req + i, 1, MSG_NOSIGNAL);
expected 'const char *' but argument is of type 'uint8_t *'

it can be resolved by replacing in tests/unit-test-server.c the line

send(w_s, req + i, 1, MSG_NOSIGNAL);

with

send(w_s, (const char*)(req + i), 1, MSG_NOSIGNAL);

@stephane stephane closed this in 457be54 Dec 11, 2013

mk8 added a commit to mk8/libmodbus that referenced this issue Jan 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment