]> git.droids-corp.org - dpdk.git/blobdiff - app/test/test_common.c
app/test: fix build without librte_cmdline
[dpdk.git] / app / test / test_common.c
index 08e606fc616fefaccc17db6918c8917b36e9e616..3c9408d242aa3d50a691116b59eb04c1e27eb859 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
@@ -36,8 +36,6 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 
-#include <cmdline_parse.h>
-
 #include "test.h"
 
 #define MAX_NUM 1 << 20
@@ -61,9 +59,9 @@ test_macros(int __rte_unused unused_parm)
 
        RTE_SET_USED(unused);
 
-       if (RTE_PTR_ADD(SMALLER, PTR_DIFF) != BIGGER)
+       if ((uintptr_t)RTE_PTR_ADD(SMALLER, PTR_DIFF) != BIGGER)
                FAIL_MACRO(RTE_PTR_ADD);
-       if (RTE_PTR_SUB(BIGGER, PTR_DIFF) != SMALLER)
+       if ((uintptr_t)RTE_PTR_SUB(BIGGER, PTR_DIFF) != SMALLER)
                FAIL_MACRO(RTE_PTR_SUB);
        if (RTE_PTR_DIFF(BIGGER, SMALLER) != PTR_DIFF)
                FAIL_MACRO(RTE_PTR_DIFF);