Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23452

Enable -Werror on Solaris

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.2.5, 3.3.5
    • Component/s: None
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      Platforms 12 (04/01/16)

      Description

      Implicit function declarations in C can have unexpected results. We should make -Wimplicit-function-declaration an error. This warning is important since WiredTiger is written in C is compiled with different settings depending on when it is compiled in mongo vs standalone.

      Example warnings from the solaris builder:

       [2016/03/31 13:35:08.113] src/third_party/wiredtiger/src/os_posix/os_alloc.c: In function '__wt_realloc_aligned':
       [2016/03/31 13:35:08.113] src/third_party/wiredtiger/src/os_posix/os_alloc.c:221:3: warning: implicit declaration of function 'posix_memalign' [-Wimplicit-function-declaration]
       [2016/03/31 13:35:08.113]    if ((ret = posix_memalign(&newp,
       [2016/03/31 13:35:08.113]    ^
       [2016/03/31 13:35:09.876] src/third_party/wiredtiger/src/os_posix/os_stdio.c: In function '__wt_fclose':
       [2016/03/31 13:35:09.876] src/third_party/wiredtiger/src/os_posix/os_stdio.c:117:3: warning: implicit declaration of function 'fileno' [-Wimplicit-function-declaration]
       [2016/03/31 13:35:09.876]    if (fsync(fileno(fp)) != 0)
       [2016/03/31 13:35:09.876]  
       [2016/03/31 13:35:10.095] src/third_party/wiredtiger/src/os_posix/os_time.c: In function '__wt_epoch':
       [2016/03/31 13:35:10.095] src/third_party/wiredtiger/src/os_posix/os_time.c:21:2: warning: implicit declaration of function 'clock_gettime' [-Wimplicit-function-declaration]
       [2016/03/31 13:35:10.095]   WT_SYSCALL_RETRY(clock_gettime(CLOCK_REALTIME, tsp), ret);
       [2016/03/31 13:35:10.095] 
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: