Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2052

OS X clang compiler warnings.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
      Target: x86_64-apple-darwin14.5.0

      Has a 32-bit size_t, and so the new inline atomic functions produce errors:

      ./src/include/btree.i:53:26: warning: incompatible pointer types passing 'size_t
       *' (aka 'unsigned long *') to parameter of type 'uint64_t *' (aka 'unsigned lon
      g long *') [-Wincompatible-pointer-types]
              (void)__wt_atomic_add64(&page->memory_footprint, size);
                                      ^~~~~~~~~~~~~~~~~~~~~~~
      ./src/include/btree.i:56:27: warning: incompatible pointer types passing 'size_t
       *' (aka 'unsigned long *') to parameter of type 'uint64_t *' (aka 'unsigned lon
      g long *') [-Wincompatible-pointer-types]
                      (void)__wt_atomic_add64(&page->modify->bytes_dirty, size);
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
      

      I think it's probably a mistake to limit in-memory page size to 32-bits, which means WT_PAGE.memory_footprint and WT_PAGE_MODIFY.bytes_dirty need to change from size_t to uint64_t?

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: