On 01/19/18 14:56, Reio Remma wrote:
Hello!

There are some warnings when doing make check in CentOS 7 (not sure how serious the warnings are ( I'm averse to warnings)).

Thanks!
Reio

-------------------------------------------------------------------------------------------------------------

gcc -DHAVE_CONFIG_H -I. -I.. -I../smtpd -I../openbsd-compat -I/usr/include -g -O2 -fPIC -DPIC -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -fno-builtin-memset -D_BSD_SOURCE -D_DEFAULT_SOURCE -c -o pw_dup.o pw_dup.c
pw_dup.c: In function ‘pw_dup’:
pw_dup.c:47:3: warning: ‘ssize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   (void)memcpy(cp, pw->name, size); \
   ^
pw_dup.c:57:39: note: ‘ssize’ was declared here
  size_t   nsize, psize, gsize, dsize, ssize, total;
                                       ^
pw_dup.c:47:3: warning: ‘dsize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   (void)memcpy(cp, pw->name, size); \
   ^
pw_dup.c:57:32: note: ‘dsize’ was declared here
  size_t   nsize, psize, gsize, dsize, ssize, total;
                                ^
pw_dup.c:47:3: warning: ‘gsize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   (void)memcpy(cp, pw->name, size); \
   ^
pw_dup.c:57:25: note: ‘gsize’ was declared here
  size_t   nsize, psize, gsize, dsize, ssize, total;
                         ^
pw_dup.c:47:3: warning: ‘psize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   (void)memcpy(cp, pw->name, size); \
   ^
pw_dup.c:57:18: note: ‘psize’ was declared here
  size_t   nsize, psize, gsize, dsize, ssize, total;
                  ^
pw_dup.c:49:6: warning: ‘nsize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   cp += size;    \
      ^
pw_dup.c:57:11: note: ‘nsize’ was declared here
  size_t   nsize, psize, gsize, dsize, ssize, total;
           ^
-------------------------------------------------------------------------------------------------------------

gcc -DHAVE_CONFIG_H -I. -I.. -I../smtpd -I../openbsd-compat -I/usr/include -g -O2 -fPIC -DPIC -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -fno-builtin-memset -D_BSD_SOURCE -D_DEFAULT_SOURCE -c -o crypt_checkpass.o crypt_checkpass.c
crypt_checkpass.c: In function ‘crypt_checkpass’:
crypt_checkpass.c:20:2: warning: implicit declaration of function ‘crypt’ [-Wimplicit-function-declaration]
  if (strcmp(crypt(pass, goodhash), goodhash) == 0)
  ^
crypt_checkpass.c:20:2: warning: passing argument 1 of ‘strlen’ makes pointer from integer without a cast [enabled by default]
In file included from crypt_checkpass.c:7:0:
/usr/include/string.h:395:15: note: expected ‘const char *’ but argument is of type ‘int’
 extern size_t strlen (const char *__s)
               ^
crypt_checkpass.c:20:2: warning: passing argument 1 of ‘__builtin_strcmp’ makes pointer from integer without a cast [enabled by default]
  if (strcmp(crypt(pass, goodhash), goodhash) == 0)
  ^
crypt_checkpass.c:20:2: note: expected ‘const char *’ but argument is of type ‘int’ crypt_checkpass.c:20:2: warning: passing argument 1 of ‘strlen’ makes pointer from integer without a cast [enabled by default]
In file included from crypt_checkpass.c:7:0:
/usr/include/string.h:395:15: note: expected ‘const char *’ but argument is of type ‘int’
 extern size_t strlen (const char *__s)
               ^
crypt_checkpass.c:20:2: warning: passing argument 1 of ‘__builtin_strcmp’ makes pointer from integer without a cast [enabled by default]
  if (strcmp(crypt(pass, goodhash), goodhash) == 0)
  ^
crypt_checkpass.c:20:2: note: expected ‘const char *’ but argument is of type ‘int’ crypt_checkpass.c:20:2: warning: passing argument 1 of ‘__builtin_strcmp’ makes pointer from integer without a cast [enabled by default] crypt_checkpass.c:20:2: note: expected ‘const char *’ but argument is of type ‘int’ crypt_checkpass.c:20:2: warning: passing argument 1 of ‘__builtin_strcmp’ makes pointer from integer without a cast [enabled by default] crypt_checkpass.c:20:2: note: expected ‘const char *’ but argument is of type ‘int’

Do you have crypt.h in /usr/include?


-------------------------------------------------------------------------------------------------------------

gcc -DHAVE_CONFIG_H -I. -I../.. -I../../smtpd -I../../openbsd-compat -I. -I/usr/include -DSMTPD_CONFDIR=\"/etc\" -DPATH_CHROOT=\"/var/empty\" -DPATH_SMTPCTL=\"/usr/local/sbin/smtpctl\" -DPATH_MAILLOCAL=\"/usr/local/libexec/opensmtpd/mail.local\" -DPATH_LIBEXEC=\"/usr/local/libexec/opensmtpd\" -DHAVE_CONFIG_H -DIO_SSL -DCA_FILE=\"/etc/ssl/cert.pem\" -g -O2 -fPIC -DPIC -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -fno-builtin-memset -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE -DNEED_EVENT_ASR_RUN -c -o ../../smtpd/smtpd-table.o `test -f '../../smtpd/table.c' || echo './'`../../smtpd/table.c
../../smtpd/table.c: In function ‘table_dump_lookup’:
../../smtpd/table.c:708:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if (ret >= sizeof(buf)) {
            ^




--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

Reply via email to