lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241206071926.63832-1-wangdich9700@163.com>
Date: Fri,  6 Dec 2024 15:19:26 +0800
From: wangdicheng <wangdich9700@....com>
To: hare@...e.com,
	James.Bottomley@...senPartnership.com,
	martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	wangdicheng <wangdicheng@...inos.cn>,
	huanglei <huanglei@...inos.cn>
Subject: [PATCH] scsi: aic7xxx: Fix build 'aicasm' warning

From: wangdicheng <wangdicheng@...inos.cn>

When building with CONFIG_AIC7XXX_BUILD_FIRMWARE=y or
CONFIG_AIC79XX_BUILD_FIRMWARE=y,  the warning message is as follow:

  aicasm_gram.tab.c:1722:16: warning: implicit declaration of function
    ‘yylex’ [-Wimplicit-function-declaration]

  aicasm_macro_gram.c:68:25: warning: implicit declaration of function
    ‘mmlex’ [-Wimplicit-function-declaration]

  aicasm_scan.l:417:6: warning: implicit declaration of function
    ‘mm_switch_to_buffer’

  aicasm_scan.l:418:6: warning: implicit declaration of function
    ‘mmparse’

  aicasm_scan.l:421:6: warning: implicit declaration of function
    ‘mm_delete_buffer’

The solution is to add the corresponding function declaration to the
corresponding file.

Signed-off-by: wangdicheng <wangdicheng@...inos.cn>
Signed-off-by: huanglei <huanglei@...inos.cn>
---
 drivers/scsi/aic7xxx/aicasm/aicasm_gram.y       | 1 +
 drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y | 1 +
 drivers/scsi/aic7xxx/aicasm/aicasm_scan.l       | 3 +++
 3 files changed, 5 insertions(+)

diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
index 65182ad9cdf8..b1c9ce477cbd 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
@@ -102,6 +102,7 @@ static void add_conditional(symbol_t *symbol);
 static void add_version(const char *verstring);
 static int  is_download_const(expression_t *immed);
 static int  is_location_address(symbol_t *symbol);
+int yylex();
 void yyerror(const char *string);
 
 #define SRAM_SYMNAME "SRAM_BASE"
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
index 8c0479865f04..5c7350eb5b5c 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
@@ -61,6 +61,7 @@
 static symbol_t *macro_symbol;
 
 static void add_macro_arg(const char *argtext, int position);
+int mmlex();
 void mmerror(const char *string);
 
 %}
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
index c78d4f68eea5..fc7e6c58148d 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
@@ -64,6 +64,9 @@ static char *string_buf_ptr;
 static int  parren_count;
 static int  quote_count;
 static char buf[255];
+void mm_switch_to_buffer(YY_BUFFER_STATE);
+void mmparse();
+void mm_delete_buffer(YY_BUFFER_STATE);
 %}
 
 PATH		([/]*[-A-Za-z0-9_.])+
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ