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

OS X clang compiler warnings.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Labels:
      None

      Description

      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?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                keith.bostic Keith Bostic
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: