diff mbox

uefibootpath: uefibootpath_check_dev_path: return int rather than int *

Message ID 1417090095-9487-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Nov. 27, 2014, 12:08 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

compiling with clang:
uefi/uefibootpath/uefibootpath.c:693:9: error: expression which evaluates
  to zero treated as a null pointer constant of type 'int *'
  [-Werror,-Wnon-literal-null-conversion]
        return FWTS_OK;
               ^~~~~~~

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/uefi/uefibootpath/uefibootpath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Hung Nov. 28, 2014, 9:36 a.m. UTC | #1
On 14-11-27 08:08 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> compiling with clang:
> uefi/uefibootpath/uefibootpath.c:693:9: error: expression which evaluates
>    to zero treated as a null pointer constant of type 'int *'
>    [-Werror,-Wnon-literal-null-conversion]
>          return FWTS_OK;
>                 ^~~~~~~
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/uefi/uefibootpath/uefibootpath.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/uefi/uefibootpath/uefibootpath.c b/src/uefi/uefibootpath/uefibootpath.c
> index 007aa0f..46c2455 100644
> --- a/src/uefi/uefibootpath/uefibootpath.c
> +++ b/src/uefi/uefibootpath/uefibootpath.c
> @@ -41,7 +41,7 @@ static int uefibootpath_init(fwts_framework *fw)
>   	return FWTS_OK;
>   }
>   
> -static int *uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *dev_path, const size_t dev_path_len)
> +static int uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *dev_path, const size_t dev_path_len)
>   {
>   	uint16_t len;
>   
Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Dec. 5, 2014, 9:02 a.m. UTC | #2
On 2014年11月27日 20:08, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> compiling with clang:
> uefi/uefibootpath/uefibootpath.c:693:9: error: expression which evaluates
>    to zero treated as a null pointer constant of type 'int *'
>    [-Werror,-Wnon-literal-null-conversion]
>          return FWTS_OK;
>                 ^~~~~~~
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/uefi/uefibootpath/uefibootpath.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/uefi/uefibootpath/uefibootpath.c b/src/uefi/uefibootpath/uefibootpath.c
> index 007aa0f..46c2455 100644
> --- a/src/uefi/uefibootpath/uefibootpath.c
> +++ b/src/uefi/uefibootpath/uefibootpath.c
> @@ -41,7 +41,7 @@ static int uefibootpath_init(fwts_framework *fw)
>   	return FWTS_OK;
>   }
>   
> -static int *uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *dev_path, const size_t dev_path_len)
> +static int uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *dev_path, const size_t dev_path_len)
>   {
>   	uint16_t len;
>   
Thanks! Colin,

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/uefi/uefibootpath/uefibootpath.c b/src/uefi/uefibootpath/uefibootpath.c
index 007aa0f..46c2455 100644
--- a/src/uefi/uefibootpath/uefibootpath.c
+++ b/src/uefi/uefibootpath/uefibootpath.c
@@ -41,7 +41,7 @@  static int uefibootpath_init(fwts_framework *fw)
 	return FWTS_OK;
 }
 
-static int *uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *dev_path, const size_t dev_path_len)
+static int uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *dev_path, const size_t dev_path_len)
 {
 	uint16_t len;