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

Enable -Werror on Solaris

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.5, 3.3.5
    • Affects Version/s: 3.3.3
    • Component/s: None
    • Fully Compatible
    • ALL
    • Platforms 12 (04/01/16)

      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] 
      

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: