[erlang-bugs] clang compiler warnings

Xu Yifeng <>
Fri Nov 16 04:11:29 CET 2012


I have compiled Erlang R15B02 with clang on FreeBSD, and got quite
a lot of warnings. Please see attachment.

Regards,
Xu Yifeng

-------------- next part --------------
configure: WARNING: Can not find wx/stc/stc.h -g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -std=gnu89 -isystem /usr/X11R6/include  -D_GNU_SOURCE -D_THREAD_SAFE -D_REENTRANT -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -D_THREAD_SAFE
configure: WARNING: Can not link wx program are all developer packages installed?
configure: WARNING: Check for large file support flags failed; getconf failed
configure: WARNING: No 'fop' command found: going to generate placeholder PDF files
beam/erl_instrument.c:778:48: warning: for loop has empty body [-Wempty-body]
        for (bp = mem_anchor; bp->next; bp = bp->next);
                                                      ^
beam/erl_instrument.c:778:48: note: put the semicolon on a separate line to silence this warning
1 warning generated.
beam/erl_bif_info.c:3324:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (res < 0)
                ~~~ ^ ~
beam/erl_bif_info.c:3681:11: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                if (res < 0)
                    ~~~ ^ ~
2 warnings generated.
beam/bif.c:339:5: warning: variable 'mon' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
    default:
    ^~~~~~~
beam/bif.c:364:26: note: uninitialized use occurs here
    erts_destroy_monitor(mon);
                         ^~~
beam/bif.c:258:21: note: initialize the variable 'mon' to silence this warning
    ErtsMonitor *mon;
                    ^
                     = NULL
beam/bif.c:1531:5: warning: expression result unused [-Wunused-value]
           ERTS_PROC_SET_TRAP_EXIT(BIF_P);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beam/erl_process.h:1034:4: note: expanded from macro 'ERTS_PROC_SET_TRAP_EXIT'
   1)
   ^
2 warnings generated.
beam/io.c:3573:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (hlen < 0)
        ~~~~ ^ ~
1 warning generated.
beam/external.c:972:13: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (hsz < 0)
        ~~~ ^ ~
1 warning generated.
beam/dist.c:2474:5: warning: expression result unused; should this cast be to 'void'? [-Wunused-value]
    (void *) ERTS_PROC_SET_DIST_ENTRY(net_kernel,
    ^     ~
1 warning generated.
beam/packet_parser.c:463:22: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (plen < 0)
                ~~~~ ^ ~
1 warning generated.
beam/beam_load.c:2931:40: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (Size.type == TAG_i && Size.val < 0) {
                              ~~~~~~~~ ^ ~
beam/beam_load.c:5967:12: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        if (arity < 0) {
            ~~~~~ ^ ~
2 warnings generated.
beam/beam_bp.c:762:3: warning: expression result unused; should this cast be to 'void'? [-Wunused-value]
                (void *) ERTS_PROC_SET_CALL_TIME(p, ERTS_PROC_LOCK_MAIN, pbt);
                ^     ~
1 warning generated.
drivers/unix/unix_efile.c:1504:11: warning: implicit declaration of function 'sendfile' [-Wimplicit-function-declaration]
        retval = sendfile(in_fd, out_fd, *offset, SENDFILE_CHUNK_SIZE,
                 ^
1 warning generated.
drivers/common/gzio.c:329:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        } else if (res < 0) {
                   ~~~ ^ ~
drivers/common/gzio.c:502:21: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            } else if (res < 0) {
                       ~~~ ^ ~
2 warnings generated.
sys/unix/sys_float.c:835:16: warning: declaration of 'struct exception' will not be visible outside of this function [-Wvisibility]
matherr(struct exception *exc)
               ^
sys/unix/sys_float.c:835:1: warning: no previous prototype for function 'matherr' [-Wmissing-prototypes]
matherr(struct exception *exc)
^
2 warnings generated.
sys/common/erl_poll.c:2400:72: warning: for loop has empty body [-Wempty-body]
        for (prev_ps = pollsets; ps != prev_ps->next; prev_ps = prev_ps->next);
                                                                              ^
sys/common/erl_poll.c:2400:72: note: put the semicolon on a separate line to silence this warning
1 warning generated.
sys/common/erl_poll.c:2400:72: warning: for loop has empty body [-Wempty-body]
        for (prev_ps = pollsets; ps != prev_ps->next; prev_ps = prev_ps->next);
                                                                              ^
sys/common/erl_poll.c:2400:72: note: put the semicolon on a separate line to silence this warning
1 warning generated.
hipe/hipe_x86_signal.c:264:5: warning: no previous prototype for function '_sigaction' [-Wmissing-prototypes]
int __SIGACTION(int signum, const struct sigaction *act, struct sigaction *oldact)
    ^
hipe/hipe_x86_signal.c:222:21: note: expanded from macro '__SIGACTION'
#define __SIGACTION _sigaction
                    ^
1 warning generated.
common/ethr_mutex.c:695:7: warning: expression result unused [-Wunused-value]
                    ETHR_YIELD();
                    ^~~~~~~~~~~~
../include/internal/ethread.h:403:49: note: expanded from macro 'ETHR_YIELD'
#      define ETHR_YIELD() (sched_yield() < 0 ? errno : 0)
                                                ^
/usr/include/errno.h:46:17: note: expanded from macro 'errno'
#define errno           (* __error())
                         ^ ~~~~~~~~~
common/ethr_mutex.c:714:3: warning: expression result unused [-Wunused-value]
                ETHR_YIELD();
                ^~~~~~~~~~~~
../include/internal/ethread.h:403:49: note: expanded from macro 'ETHR_YIELD'
#      define ETHR_YIELD() (sched_yield() < 0 ? errno : 0)
                                                ^
/usr/include/errno.h:46:17: note: expanded from macro 'errno'
#define errno           (* __error())
                         ^ ~~~~~~~~~
common/ethr_mutex.c:2164:3: warning: expression result unused [-Wunused-value]
                ETHR_YIELD();
                ^~~~~~~~~~~~
../include/internal/ethread.h:403:49: note: expanded from macro 'ETHR_YIELD'
#      define ETHR_YIELD() (sched_yield() < 0 ? errno : 0)
                                                ^
/usr/include/errno.h:46:17: note: expanded from macro 'errno'
#define errno           (* __error())
                         ^ ~~~~~~~~~
common/ethr_mutex.c:2291:3: warning: expression result unused [-Wunused-value]
                ETHR_YIELD();
                ^~~~~~~~~~~~
../include/internal/ethread.h:403:49: note: expanded from macro 'ETHR_YIELD'
#      define ETHR_YIELD() (sched_yield() < 0 ? errno : 0)
                                                ^
/usr/include/errno.h:46:17: note: expanded from macro 'errno'
#define errno           (* __error())
                         ^ ~~~~~~~~~
4 warnings generated.
common/erl_printf_format.c:439:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (size < 0) {
        ~~~~ ^ ~
1 warning generated.
common/erl_printf_format.c:439:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (size < 0) {
        ~~~~ ^ ~
1 warning generated.
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
beam/erl_instrument.c:778:48: warning: for loop has empty body [-Wempty-body]
        for (bp = mem_anchor; bp->next; bp = bp->next);
                                                      ^
beam/erl_instrument.c:778:48: note: put the semicolon on a separate line to silence this warning
1 warning generated.
beam/erl_bif_info.c:3324:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (res < 0)
                ~~~ ^ ~
beam/erl_bif_info.c:3681:11: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                if (res < 0)
                    ~~~ ^ ~
2 warnings generated.
beam/bif.c:339:5: warning: variable 'mon' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
    default:
    ^~~~~~~
beam/bif.c:364:26: note: uninitialized use occurs here
    erts_destroy_monitor(mon);
                         ^~~
beam/bif.c:258:21: note: initialize the variable 'mon' to silence this warning
    ErtsMonitor *mon;
                    ^
                     = NULL
beam/bif.c:1531:5: warning: expression result unused [-Wunused-value]
           ERTS_PROC_SET_TRAP_EXIT(BIF_P);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beam/erl_process.h:1045:63: note: expanded from macro 'ERTS_PROC_SET_TRAP_EXIT'
#define ERTS_PROC_SET_TRAP_EXIT(P) ((P)->flags |= F_TRAPEXIT, 1)
                                                              ^
2 warnings generated.
beam/io.c:3573:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (hlen < 0)
        ~~~~ ^ ~
1 warning generated.
beam/external.c:972:13: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (hsz < 0)
        ~~~ ^ ~
1 warning generated.
beam/dist.c:2474:5: warning: expression result unused; should this cast be to 'void'? [-Wunused-value]
    (void *) ERTS_PROC_SET_DIST_ENTRY(net_kernel,
    ^     ~
1 warning generated.
beam/packet_parser.c:463:22: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (plen < 0)
                ~~~~ ^ ~
1 warning generated.
beam/beam_load.c:2931:40: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (Size.type == TAG_i && Size.val < 0) {
                              ~~~~~~~~ ^ ~
beam/beam_load.c:5967:12: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        if (arity < 0) {
            ~~~~~ ^ ~
2 warnings generated.
beam/beam_bp.c:762:3: warning: expression result unused; should this cast be to 'void'? [-Wunused-value]
                (void *) ERTS_PROC_SET_CALL_TIME(p, ERTS_PROC_LOCK_MAIN, pbt);
                ^     ~
1 warning generated.
drivers/unix/unix_efile.c:1504:11: warning: implicit declaration of function 'sendfile' [-Wimplicit-function-declaration]
        retval = sendfile(in_fd, out_fd, *offset, SENDFILE_CHUNK_SIZE,
                 ^
1 warning generated.
drivers/common/gzio.c:329:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        } else if (res < 0) {
                   ~~~ ^ ~
drivers/common/gzio.c:502:21: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            } else if (res < 0) {
                       ~~~ ^ ~
2 warnings generated.
sys/unix/sys_float.c:835:16: warning: declaration of 'struct exception' will not be visible outside of this function [-Wvisibility]
matherr(struct exception *exc)
               ^
sys/unix/sys_float.c:835:1: warning: no previous prototype for function 'matherr' [-Wmissing-prototypes]
matherr(struct exception *exc)
^
2 warnings generated.
sys/common/erl_poll.c:2400:72: warning: for loop has empty body [-Wempty-body]
        for (prev_ps = pollsets; ps != prev_ps->next; prev_ps = prev_ps->next);
                                                                              ^
sys/common/erl_poll.c:2400:72: note: put the semicolon on a separate line to silence this warning
1 warning generated.
sys/common/erl_poll.c:2400:72: warning: for loop has empty body [-Wempty-body]
        for (prev_ps = pollsets; ps != prev_ps->next; prev_ps = prev_ps->next);
                                                                              ^
sys/common/erl_poll.c:2400:72: note: put the semicolon on a separate line to silence this warning
1 warning generated.
hipe/hipe_x86_signal.c:264:5: warning: no previous prototype for function '_sigaction' [-Wmissing-prototypes]
int __SIGACTION(int signum, const struct sigaction *act, struct sigaction *oldact)
    ^
hipe/hipe_x86_signal.c:222:21: note: expanded from macro '__SIGACTION'
#define __SIGACTION _sigaction
                    ^
1 warning generated.
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
inet_gethost.c:2565:35: warning: if statement has empty body [-Wempty-body]
    if(write(2,buff,strlen(buff)));
                                  ^
inet_gethost.c:2565:35: note: put the semicolon on a separate line to silence this warning
inet_gethost.c:2588:35: warning: if statement has empty body [-Wempty-body]
    if(write(2,buff,strlen(buff)));
                                  ^
inet_gethost.c:2588:35: note: put the semicolon on a separate line to silence this warning
inet_gethost.c:2611:35: warning: if statement has empty body [-Wempty-body]
    if(write(2,buff,strlen(buff)));
                                  ^
inet_gethost.c:2611:35: note: put the semicolon on a separate line to silence this warning
3 warnings generated.
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
heart.c:687:23: warning: if statement has empty body [-Wempty-body]
          if(system(command));
                             ^
heart.c:687:23: note: put the semicolon on a separate line to silence this warning
heart.c:695:28: warning: if statement has empty body [-Wempty-body]
        if(system((char*)&cmd[0]));
                                  ^
heart.c:695:28: note: put the semicolon on a separate line to silence this warning
2 warnings generated.
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
./erlexec.c:1131:1: warning: unused function 'usage_msg' [-Wunused-function]
usage_msg(const char *msg)
^
1 warning generated.
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
../unix/run_erl.c:925:11: warning: implicit declaration of function 'openpty' [-Wimplicit-function-declaration]
      if (openpty(&mfd, sfdp, slave, NULL, NULL) == 0) {
          ^
../unix/run_erl.c:1157:2: warning: implicit declaration of function 'vsyslog' [-Wimplicit-function-declaration]
        vsyslog(priority,format,args);
        ^
2 warnings generated.
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
Makefile:71: warning: overriding recipe for target `clean'
/usr/ports/lang/erlang/work/otp_src_R15B02/make/otp_subdir.mk:28: warning: ignoring old recipe for target `clean'
oe_ei_encode_string.c:26:3: warning: expression result unused [-Wunused-value]
  (int) ei_encode_string(0,&size,p);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
oe_ei_encode_atom.c:26:3: warning: expression result unused [-Wunused-value]
  (int) ei_encode_atom(0,&size,p);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
oe_ei_encode_pid.c:26:3: warning: expression result unused [-Wunused-value]
  (int) ei_encode_pid(NULL, &size, p);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
oe_ei_encode_port.c:26:3: warning: expression result unused [-Wunused-value]
  (int) ei_encode_port(NULL, &size, p);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
oe_ei_encode_ref.c:26:3: warning: expression result unused [-Wunused-value]
  (int) ei_encode_ref(NULL, &size, p);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
oe_ei_encode_term.c:26:3: warning: expression result unused [-Wunused-value]
  (int) ei_encode_term(NULL, &size, t);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
oe_ei_code_erlang_binary.c:27:3: warning: expression result unused [-Wunused-value]
  (int) ei_encode_binary(0, &size, binary->_buffer, binary->_length);
  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
erl_memory.c:861:19: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->size);
                  ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:863:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p,
                      ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:869:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->no);
                      ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:871:20: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
            *p += sprintf(*p,
                          ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:878:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p,
                      ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:900:19: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->max_ever_size);
                  ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:902:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p, "%*s %*s ", fw, "", fw, "");
                      ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:904:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->max_ever_no);
                      ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:906:20: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
            *p += sprintf(*p, "%*s %*s ", fw, "", fw, "");
                          ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:909:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        *p += sprintf(*p, "%*s %*s %*s ", fw, "", fw, "", fw, "");
                      ^~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:947:7: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
                    &saddr_size) != 0)
                    ^~~~~~~~~~~
/usr/include/sys/socket.h:616:74: note: passing argument to parameter here
int     getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict);
                                                                             ^
erl_memory.c:986:25: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    area.size = sprintf(area.ptr, format, carg);
                        ^~~~~~~~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1103:25: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    area.size = sprintf(area.ptr,
                        ^~~~~~~~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1109:23: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        area.size += sprintf(area.ptr + area.size,
                             ^~~~~~~~~~~~~~~~~~~~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1120:26: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    area.size += sprintf(area.ptr + area.size,
                         ^~~~~~~~~~~~~~~~~~~~
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1190:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, "> %-*s", EM_TIME_FIELD_WIDTH - 2, "Maximum:");
                 ^
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1223:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, "\n");
                 ^
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1227:15: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        p += sprintf(p, "%s", stop_str);
                     ^
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1230:15: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        p += sprintf(p, exit_str, state->info.exit_status);
                     ^
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1236:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, format, tsz, bw);
                 ^
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1286:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, "%*" USGND_INT_32_FSTR " ", EM_TIME_FIELD_WIDTH - 1, secs);
                 ^
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:1311:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    p += sprintf(p, "\n");
                 ^
/usr/include/stdio.h:267:31: note: passing argument to parameter here
int      sprintf(char * __restrict, const char * __restrict, ...);
                                  ^
erl_memory.c:2231:32: warning: passing 'char *' to parameter of type 'usgnd_int_8 *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
    size = write_header(state, state->output.header, 1);
                               ^~~~~~~~~~~~~~~~~~~~
erl_memory.c:736:44: note: passing argument to parameter 'ptr' here
write_header(em_state *state, usgnd_int_8 *ptr, int trunc)
                                           ^
erl_memory.c:2613:57: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
    sock = accept(lsock, (struct sockaddr *) &oth_addr, &oth_addr_len);
                                                        ^~~~~~~~~~~~~
/usr/include/sys/socket.h:612:69: note: passing argument to parameter here
int     accept(int, struct sockaddr * __restrict, socklen_t * __restrict);
                                                                        ^
24 warnings generated.
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
In file included from connect/eirecv.c:35:
misc/ei_portio.h:31:46: warning: declaration of 'struct iovec' will not be visible outside of this function [-Wvisibility]
int ei_writev_fill_t(int fd,  const  struct  iovec  *iov,  int iovcnt,
                                             ^
1 warning generated.
encode/encode_ulong.c:38:28: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
  else if ((p < 256) && (p >= 0)) {
                         ~ ^  ~
1 warning generated.
encode/encode_ulonglong.c:55:25: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
    if ((p < 256) && (p >= 0)) {
                      ~ ^  ~
1 warning generated.
legacy/erl_marshal.c:273:24: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
        if ((ul < 256) && (ul >= 0)) {
                           ~~ ^  ~
1 warning generated.
In file included from connect/eirecv.c:35:
misc/ei_portio.h:31:46: warning: declaration of 'struct iovec' will not be visible outside of this function [-Wvisibility]
int ei_writev_fill_t(int fd,  const  struct  iovec  *iov,  int iovcnt,
                                             ^
1 warning generated.
encode/encode_ulong.c:38:28: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
  else if ((p < 256) && (p >= 0)) {
                         ~ ^  ~
1 warning generated.
encode/encode_ulonglong.c:55:25: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
    if ((p < 256) && (p >= 0)) {
                      ~ ^  ~
1 warning generated.
legacy/erl_marshal.c:273:24: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
        if ((ul < 256) && (ul >= 0)) {
                           ~~ ^  ~
1 warning generated.
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
cc: warning: argument unused during compilation: '-rpath=/usr/lib:/usr/local/lib'
Makefile:129: warning: overriding recipe for target `../index.html'
Makefile:126: warning: ignoring old recipe for target `../index.html'
Makefile:71: warning: overriding recipe for target `clean'
/usr/ports/lang/erlang/work/otp_src_R15B02/make/otp_subdir.mk:28: warning: ignoring old recipe for target `clean'


More information about the erlang-bugs mailing list