ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1463

external inline function is not compatible with C99

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.4.3, 3.3.5
    • Fix Version/s: 3.4.4, 3.5.0
    • Component/s: build
    • Labels:
    • Environment:

      debian linux x64

      Description

      There is a use of external inline function in zookeeper hashtable_itr.h file, which is not compatible with C99. This causes problem when compiling with other library like code coverage library.

      hashtable_itr.h:37: error: 'cov_v_cab2c78b' is static but used in inline
      function 'hashtable_iterator_key' which is not static

      The easy fix would be put the following line in hashtable_itr.c which ignores this inline warning.
      #pragma GCC diagnostic ignored "-Winline"

        Activity

        Michael Hu created issue -
        Michael Hu made changes -
        Field Original Value New Value
        Affects Version/s 3.3.5 [ 12319081 ]
        Description There is a use of external inline function, which is not in standard in C99, in zookeeper hashtable_itr.h file. This causes problem when compiling with other library like code coverage library.
        ---
        hashtable_itr.h:37: error: 'cov_v_cab2c78b' is static but used in inline
        function 'hashtable_iterator_key' which is not static
        ---

        The easy fix would be put the following line in hashtable_itr.c which is to ignore this non-standard function.
        #pragma GCC diagnostic ignored "-Winline"
        There is a use of external inline function in zookeeper hashtable_itr.h file, which is not compatible with C99. This causes problem when compiling with other library like code coverage library.
        ---
        hashtable_itr.h:37: error: 'cov_v_cab2c78b' is static but used in inline
        function 'hashtable_iterator_key' which is not static
        ---

        The easy fix would be put the following line in hashtable_itr.c which ignores this inline warning.
        #pragma GCC diagnostic ignored "-Winline"
        Michael Hu made changes -
        Attachment zookeeper-1463.patch [ 12525968 ]
        Michael Hu made changes -
        Attachment zookeeper-1463_1339.patch [ 12525970 ]
        Patrick Hunt made changes -
        Assignee Michael Hu [ pwp ]
        Patrick Hunt made changes -
        Fix Version/s 3.4.4 [ 12319841 ]
        Fix Version/s 3.5.0 [ 12316644 ]
        Michael Hu made changes -
        Attachment zookeeper-1463.patch [ 12525968 ]
        Michael Hu made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Michi Mutsuzaki made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Duplicate [ 3 ]

          People

          • Assignee:
            Michael Hu
            Reporter:
            Michael Hu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.1h
              0.1h
              Remaining:
              Remaining Estimate - 0.1h
              0.1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development