aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTaras Kondratiuk <taras.kondratiuk@linaro.org>2014-07-21 20:17:12 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-07-23 13:32:08 +0400
commite76f3c7e6f7c263ce7efadb26075bccfc6d35346 (patch)
tree04df3d4066507ea0d40bc4b44384d2266a254af9 /include
parentf0eedc78beb313a01c8ecbb0b4140fa75e00733f (diff)
debug: Replace ODP_ASSERT with ODP_STATIC_ASSERT
Replace ODP_ASSERT with ODP_STATIC_ASSERT and stringify error messages. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/helper/odp_eth.h6
-rw-r--r--include/helper/odp_icmp.h2
-rw-r--r--include/helper/odp_ip.h4
-rw-r--r--include/helper/odp_udp.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/include/helper/odp_eth.h b/include/helper/odp_eth.h
index 401b915c..542594b9 100644
--- a/include/helper/odp_eth.h
+++ b/include/helper/odp_eth.h
@@ -39,7 +39,7 @@ typedef struct ODP_PACKED {
} odp_ethaddr_t;
/** @internal Compile time assert */
-ODP_ASSERT(sizeof(odp_ethaddr_t) == ODP_ETHADDR_LEN, ODP_ETHADDR_T__SIZE_ERROR);
+ODP_STATIC_ASSERT(sizeof(odp_ethaddr_t) == ODP_ETHADDR_LEN, "ODP_ETHADDR_T__SIZE_ERROR");
/**
* Ethernet header
@@ -51,7 +51,7 @@ typedef struct ODP_PACKED {
} odp_ethhdr_t;
/** @internal Compile time assert */
-ODP_ASSERT(sizeof(odp_ethhdr_t) == ODP_ETHHDR_LEN, ODP_ETHHDR_T__SIZE_ERROR);
+ODP_STATIC_ASSERT(sizeof(odp_ethhdr_t) == ODP_ETHHDR_LEN, "ODP_ETHHDR_T__SIZE_ERROR");
/**
* VLAN header
@@ -64,7 +64,7 @@ typedef struct ODP_PACKED {
} odp_vlanhdr_t;
/** @internal Compile time assert */
-ODP_ASSERT(sizeof(odp_vlanhdr_t) == ODP_VLANHDR_LEN, ODP_VLANHDR_T__SIZE_ERROR);
+ODP_STATIC_ASSERT(sizeof(odp_vlanhdr_t) == ODP_VLANHDR_LEN, "ODP_VLANHDR_T__SIZE_ERROR");
/* Ethernet header Ether Type ('type') values, a selected few */
diff --git a/include/helper/odp_icmp.h b/include/helper/odp_icmp.h
index ab8c4096..5ac88b9c 100644
--- a/include/helper/odp_icmp.h
+++ b/include/helper/odp_icmp.h
@@ -90,7 +90,7 @@ typedef struct ODP_PACKED {
exceeded*/
/** @internal Compile time assert */
-ODP_ASSERT(sizeof(odp_icmphdr_t) == ODP_ICMPHDR_LEN, ODP_ICMPHDR_T__SIZE_ERROR);
+ODP_STATIC_ASSERT(sizeof(odp_icmphdr_t) == ODP_ICMPHDR_LEN, "ODP_ICMPHDR_T__SIZE_ERROR");
#ifdef __cplusplus
}
diff --git a/include/helper/odp_ip.h b/include/helper/odp_ip.h
index 6f4e0288..fb04e4d1 100644
--- a/include/helper/odp_ip.h
+++ b/include/helper/odp_ip.h
@@ -62,7 +62,7 @@ typedef struct ODP_PACKED {
} odp_ipv4hdr_t;
/** @internal Compile time assert */
-ODP_ASSERT(sizeof(odp_ipv4hdr_t) == ODP_IPV4HDR_LEN, ODP_IPV4HDR_T__SIZE_ERROR);
+ODP_STATIC_ASSERT(sizeof(odp_ipv4hdr_t) == ODP_IPV4HDR_LEN, "ODP_IPV4HDR_T__SIZE_ERROR");
/**
* Check if IPv4 checksum is valid
@@ -135,7 +135,7 @@ typedef struct ODP_PACKED {
} odp_ipv6hdr_t;
/** @internal Compile time assert */
-ODP_ASSERT(sizeof(odp_ipv6hdr_t) == ODP_IPV6HDR_LEN, ODP_IPV6HDR_T__SIZE_ERROR);
+ODP_STATIC_ASSERT(sizeof(odp_ipv6hdr_t) == ODP_IPV6HDR_LEN, "ODP_IPV6HDR_T__SIZE_ERROR");
/** @name
* IP protocol values (IPv4:'proto' or IPv6:'next_hdr')
diff --git a/include/helper/odp_udp.h b/include/helper/odp_udp.h
index 0ad15410..966d7f36 100644
--- a/include/helper/odp_udp.h
+++ b/include/helper/odp_udp.h
@@ -93,7 +93,7 @@ static inline uint16_t odp_ipv4_udp_chksum(odp_packet_t pkt)
}
/** @internal Compile time assert */
-ODP_ASSERT(sizeof(odp_udphdr_t) == ODP_UDPHDR_LEN, ODP_UDPHDR_T__SIZE_ERROR);
+ODP_STATIC_ASSERT(sizeof(odp_udphdr_t) == ODP_UDPHDR_LEN, "ODP_UDPHDR_T__SIZE_ERROR");
#ifdef __cplusplus
}