[exim-dev] [Bug 1145] New: Many warnings while compiled with…

Pàgina inicial
Delete this message
Reply to this message
Autor: 1099511627776
Data:  
A: exim-dev
Assumpte: [exim-dev] [Bug 1145] New: Many warnings while compiled with clang 2.9
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1145
           Summary: Many warnings while compiled with clang 2.9
           Product: Exim
           Version: 4.76
          Platform: x86
               URL: http://sevlush.net
        OS/Version: FreeBSD
            Status: NEW
          Keywords: work:small
          Severity: security
          Priority: low
         Component: Unfiled
        AssignedTo: nigel@???
        ReportedBy: 1099511627776@???
                CC: exim-dev@???



While compiling with clang:
clang version 2.9 (tags/RELEASE_29/final)
Target: i386-portbld-freebsd7.2
Thread model: posix

exim produces many warnings. Here thay are:
=================
clang mime.c
mime.c:344:48: warning: comparison of unsigned expression < 0 is always false
[-Wtautological-compare]
  if (fclose(decode_file) != 0 || size_counter < 0)
                                  ~~~~~~~~~~~~ ^ ~
1 warning generated.
=================


store.c:179:3: warning: expression result unused [-Wunused-value]
  VALGRIND_MAKE_MEM_NOACCESS(next_yield[store_pool], yield_length[store_pool]);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from store.c:44:
./memcheck.h:110:5: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
    ^
store.c:179:3: note: instantiated from:
  VALGRIND_MAKE_MEM_NOACCESS(next_yield[store_pool], yield_length[store_pool]);
  ^
In file included from store.c:44:
./memcheck.h:110:37: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
                                    ^
store.c:204:1: warning: expression result unused [-Wunused-value]
VALGRIND_MAKE_MEM_UNDEFINED(store_last_get[store_pool], size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from store.c:44:
./memcheck.h:117:5: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
    ^
store.c:204:1: note: instantiated from:
VALGRIND_MAKE_MEM_UNDEFINED(store_last_get[store_pool], size);
^
In file included from store.c:44:
./memcheck.h:117:37: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
                                    ^
store.c:299:1: warning: expression result unused [-Wunused-value]
VALGRIND_MAKE_MEM_UNDEFINED(ptr + oldsize, inc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from store.c:44:
./memcheck.h:117:5: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
    ^
store.c:299:1: note: instantiated from:
VALGRIND_MAKE_MEM_UNDEFINED(ptr + oldsize, inc);
^
In file included from store.c:44:
./memcheck.h:117:37: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
                                    ^
store.c:372:3: warning: expression result unused [-Wunused-value]
  VALGRIND_MAKE_MEM_NOACCESS((char *)b + ALIGNED_SIZEOF_STOREBLOCK, b->length -
ALIGNED_SIZEOF_STOREBLOCK);


^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from store.c:44:
./memcheck.h:110:5: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
    ^
store.c:372:3: note: instantiated from:
  VALGRIND_MAKE_MEM_NOACCESS((char *)b + ALIGNED_SIZEOF_STOREBLOCK, b->length -
ALIGNED_SIZEOF_STOREBLOCK);
  ^
In file included from store.c:44:
./memcheck.h:110:37: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
                                    ^
store.c:358:1: warning: expression result unused [-Wunused-value]
VALGRIND_MAKE_MEM_NOACCESS(ptr, newlength);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from store.c:44:
./memcheck.h:110:5: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
    ^
store.c:358:1: note: instantiated from:
VALGRIND_MAKE_MEM_NOACCESS(ptr, newlength);
^
In file included from store.c:44:
./memcheck.h:110:37: note: instantiated from:
    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
                                    ^
5 warnings generated.
==========================


clang queue.c
queue.c:615:5: warning: array index of '16' indexes past the end of an array
(that contains 1 elements) [-Warray-bounds]
    f->text[SPOOL_NAME_LENGTH-2] = 0;
    ^       ~~~~~~~~~~~~~~~~~~~
===========================
clang host.c
host.c:2477:39: warning: use of '%n' in format string discouraged (potentially
insecure) [-Wformat-security]
  (void)sprintf(CS buffer, "_%s._tcp.%n%.256s", srv_service, &prefix_length,
                                     ~^
1 warning generated.
============================
clang filter.c
filter.c:1036:7: warning: array index of '1' indexes past the end of an array
(that contains 1 elements) [-Warray-bounds]
      new->args[1] = second_argument;
      ^         ~
filter.c:41:18: note: array 'args' declared here
  union argtypes args[1];
                 ^
filter.c:2337:13: warning: array index of '11' indexes past the end of an array
(that contains 1 elements) [-Warray-bounds]
            commands->args[mailarg_index_once_repeat]);
            ^              ~~~~~~~~~~~~~~~~~~~~~~~~~
filter.c:41:18: note: array 'args' declared here
  union argtypes args[1];
                 ^
2 warnings generated.
==============================


clang exim.c
exim.c:337:35: warning: conversion specifies type 'unsigned long' but the
argument has type 'time_t' (aka 'int') [-Wformat]
      debug_printf("tick check: %lu.%06lu %lu.%06lu\n",
                                ~~^
                                %d
exim.c:337:45: warning: conversion specifies type 'unsigned long' but the
argument has type 'time_t' (aka 'int') [-Wformat]
      debug_printf("tick check: %lu.%06lu %lu.%06lu\n",
                                          ~~^
                                          %d
exim.c:339:31: warning: conversion specifies type 'unsigned long' but the
argument has type 'time_t' (aka 'int') [-Wformat]
      debug_printf("waiting %lu.%06lu\n", itval.it_value.tv_sec,
                            ~~^           ~~~~~~~~~~~~~~~~~~~~~
                            %d
exim.c:913:33: warning: conversion specifies type 'unsigned long' but the
argument has type 'unsigned int' [-Wformat]
fprintf(f, "Size of off_t: " SIZE_T_FMT "\n", sizeof(off_t));
                             ^                ~~~~~~~~~~~~~
========================
clang acl.c
acl.c:2483:31: warning: use of '%n' in format string discouraged (potentially
insecure) [-Wformat-security]
    debug_printf("check %s%s %n",
                             ~^
1 warning generated.



--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email