gcc warning fix: -Wextra
[babeltrace.git] / include / babeltrace / bitfield.h
index df8ab0b2b67a224bed60a9b86d866494a288f37f..b7fce09301781a7f8697921bc384aada739f0760 100644 (file)
  *
  * The above copyright notice and this permission notice shall be included in
  * all copies or substantial portions of the Software.
  *
  * The above copyright notice and this permission notice shall be included in
  * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
  */
 
 #include <stdint.h>    /* C99 5.2.4.2 Numerical limits */
 #include <limits.h>    /* C99 5.2.4.2 Numerical limits */
  */
 
 #include <stdint.h>    /* C99 5.2.4.2 Numerical limits */
 #include <limits.h>    /* C99 5.2.4.2 Numerical limits */
-#include <endian.h>    /* Non-standard BIG_ENDIAN, LITTLE_ENDIAN, BYTE_ORDER */
 #include <assert.h>
 #include <assert.h>
+#include <babeltrace/endian.h> /* Non-standard BIG_ENDIAN, LITTLE_ENDIAN, BYTE_ORDER */
 
 /* We can't shift a int from 32 bit, >> 32 and << 32 on int is undefined */
 #define _bt_piecewise_rshift(_v, _shift)                               \
 
 /* We can't shift a int from 32 bit, >> 32 and << 32 on int is undefined */
 #define _bt_piecewise_rshift(_v, _shift)                               \
@@ -49,7 +57,7 @@
        ___v <<= final;                                                 \
 })
 
        ___v <<= final;                                                 \
 })
 
-#define _bt_is_signed_type(type)       (((type)(-1)) < 0)
+#define _bt_is_signed_type(type)       ((type) -1 < (type) 0)
 
 #define _bt_unsigned_cast(type, v)                                     \
 ({                                                                     \
 
 #define _bt_unsigned_cast(type, v)                                     \
 ({                                                                     \
This page took 0.025997 seconds and 4 git commands to generate.