diff mbox

linux-generic: queue: avoid false positive when compiling with -Og

Message ID 1459551806-19070-1-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit 235fbd324fdf8ceb99e214304f1a04ccc68c9260
Headers show

Commit Message

Bill Fischofer April 1, 2016, 11:03 p.m. UTC
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2159 by adding an
extraneous variable initialization to avoid a false positive error when
compiling with gcc -Og

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/odp_queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mike Holmes April 5, 2016, 6:02 p.m. UTC | #1
Any one object to this?
It impacts the accuracy of the ABI testing tools if -Og cannot be used.

On 1 April 2016 at 19:03, Bill Fischofer <bill.fischofer@linaro.org> wrote:

> Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2159 by adding an

> extraneous variable initialization to avoid a false positive error when

> compiling with gcc -Og

>

> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

> ---

>  platform/linux-generic/odp_queue.c | 2 +-

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

>

> diff --git a/platform/linux-generic/odp_queue.c

> b/platform/linux-generic/odp_queue.c

> index 342ffa2..5963057 100644

> --- a/platform/linux-generic/odp_queue.c

> +++ b/platform/linux-generic/odp_queue.c

> @@ -237,7 +237,7 @@ odp_queue_t odp_queue_create(const char *name, const

> odp_queue_param_t *param)

>         uint32_t i;

>         queue_entry_t *queue;

>         odp_queue_t handle = ODP_QUEUE_INVALID;

> -       odp_queue_type_t type;

> +       odp_queue_type_t type = ODP_QUEUE_TYPE_PLAIN;

>         odp_queue_param_t default_param;

>

>         if (param == NULL) {

> --

> 2.5.0

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>




-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
diff mbox

Patch

diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index 342ffa2..5963057 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -237,7 +237,7 @@  odp_queue_t odp_queue_create(const char *name, const odp_queue_param_t *param)
 	uint32_t i;
 	queue_entry_t *queue;
 	odp_queue_t handle = ODP_QUEUE_INVALID;
-	odp_queue_type_t type;
+	odp_queue_type_t type = ODP_QUEUE_TYPE_PLAIN;
 	odp_queue_param_t default_param;
 
 	if (param == NULL) {