diff mbox

example: l2fwd: fix clang build

Message ID 1473102329-19148-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit d96981e81ecbfc54ac8832d3ed2c32f50eaaf9a1
Headers show

Commit Message

Maxim Uvarov Sept. 5, 2016, 7:05 p.m. UTC
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
 example/l3fwd/odp_l3fwd_db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.1.250.gff4ea60

Comments

Maxim Uvarov Sept. 5, 2016, 7:18 p.m. UTC | #1
subject has to be l3fwd :)

I have to read what I write before sending. Will change subject on merge.

Maxim.

On 09/05/16 22:05, Maxim Uvarov wrote:
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

> ---

>   example/l3fwd/odp_l3fwd_db.c | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/example/l3fwd/odp_l3fwd_db.c b/example/l3fwd/odp_l3fwd_db.c

> index 4731237..082b2c2 100644

> --- a/example/l3fwd/odp_l3fwd_db.c

> +++ b/example/l3fwd/odp_l3fwd_db.c

> @@ -209,7 +209,7 @@ static void create_fwd_hash_cache(void)

>   	}

>   

>   	size = sizeof(flow_bucket_t) * bucket_count;

> -	flows = (flow_entry_t *)((char *)bucket + size);

> +	flows = (flow_entry_t *)(void *)((char *)bucket + size);

>   

>   	fwd_lookup_cache.bucket = bucket;

>   	fwd_lookup_cache.bkt_cnt = bucket_count;
Bill Fischofer Sept. 6, 2016, 12:30 a.m. UTC | #2
Yes, other than the subject typo, this looks good.  Thanks.

On Mon, Sep 5, 2016 at 10:18 PM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> subject has to be l3fwd :)

>

> I have to read what I write before sending. Will change subject on merge.

>

> Maxim.

>

>

> On 09/05/16 22:05, Maxim Uvarov wrote:

>

>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>>

>

Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---

>>   example/l3fwd/odp_l3fwd_db.c | 2 +-

>>   1 file changed, 1 insertion(+), 1 deletion(-)

>>

>> diff --git a/example/l3fwd/odp_l3fwd_db.c b/example/l3fwd/odp_l3fwd_db.c

>> index 4731237..082b2c2 100644

>> --- a/example/l3fwd/odp_l3fwd_db.c

>> +++ b/example/l3fwd/odp_l3fwd_db.c

>> @@ -209,7 +209,7 @@ static void create_fwd_hash_cache(void)

>>         }

>>         size = sizeof(flow_bucket_t) * bucket_count;

>> -       flows = (flow_entry_t *)((char *)bucket + size);

>> +       flows = (flow_entry_t *)(void *)((char *)bucket + size);

>>         fwd_lookup_cache.bucket = bucket;

>>         fwd_lookup_cache.bkt_cnt = bucket_count;

>>

>

>
Maxim Uvarov Sept. 6, 2016, 7:15 a.m. UTC | #3
Merged,
Maxim.

On 09/06/16 03:30, Bill Fischofer wrote:
> Yes, other than the subject typo, this looks good. Thanks.

>

> On Mon, Sep 5, 2016 at 10:18 PM, Maxim Uvarov <maxim.uvarov@linaro.org 

> <mailto:maxim.uvarov@linaro.org>> wrote:

>

>     subject has to be l3fwd :)

>

>     I have to read what I write before sending. Will change subject on

>     merge.

>

>     Maxim.

>

>

>     On 09/05/16 22:05, Maxim Uvarov wrote:

>

>         Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org

>         <mailto:maxim.uvarov@linaro.org>>

>

>

> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org 

> <mailto:bill.fischofer@linaro.org>>

>

>         ---

>           example/l3fwd/odp_l3fwd_db.c | 2 +-

>           1 file changed, 1 insertion(+), 1 deletion(-)

>

>         diff --git a/example/l3fwd/odp_l3fwd_db.c

>         b/example/l3fwd/odp_l3fwd_db.c

>         index 4731237..082b2c2 100644

>         --- a/example/l3fwd/odp_l3fwd_db.c

>         +++ b/example/l3fwd/odp_l3fwd_db.c

>         @@ -209,7 +209,7 @@ static void create_fwd_hash_cache(void)

>                 }

>                 size = sizeof(flow_bucket_t) * bucket_count;

>         -       flows = (flow_entry_t *)((char *)bucket + size);

>         +       flows = (flow_entry_t *)(void *)((char *)bucket + size);

>                 fwd_lookup_cache.bucket = bucket;

>                 fwd_lookup_cache.bkt_cnt = bucket_count;

>

>

>
diff mbox

Patch

diff --git a/example/l3fwd/odp_l3fwd_db.c b/example/l3fwd/odp_l3fwd_db.c
index 4731237..082b2c2 100644
--- a/example/l3fwd/odp_l3fwd_db.c
+++ b/example/l3fwd/odp_l3fwd_db.c
@@ -209,7 +209,7 @@  static void create_fwd_hash_cache(void)
 	}
 
 	size = sizeof(flow_bucket_t) * bucket_count;
-	flows = (flow_entry_t *)((char *)bucket + size);
+	flows = (flow_entry_t *)(void *)((char *)bucket + size);
 
 	fwd_lookup_cache.bucket = bucket;
 	fwd_lookup_cache.bkt_cnt = bucket_count;