[v1,2/8] aarch64: constify unchanged char* arguments

Message ID 20241023104816.501176-3-matthieu.longo@arm.com
State Committed
Headers
Series small refactorings before posting PAuth_LR patch series |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Matthieu Longo Oct. 23, 2024, 10:48 a.m. UTC
  ---
 gas/config/tc-aarch64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Richard Earnshaw (lists) Nov. 5, 2024, 5:15 p.m. UTC | #1
On 23/10/2024 11:48, Matthieu Longo wrote:
> ---
>  gas/config/tc-aarch64.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
> index e94a0cff406..f5beea5bfe9 100644
> --- a/gas/config/tc-aarch64.c
> +++ b/gas/config/tc-aarch64.c
> @@ -6245,7 +6245,7 @@ lookup_mnemonic (const char *start, int len)
>     (if any) and END points to the end of the mnemonic.  */
>  
>  static templates *
> -opcode_lookup (char *base, char *dot, char *end)
> +opcode_lookup (const char *base, const char *dot, const char *end)
>  {
>    const aarch64_cond *cond;
>    char condname[16];

OK, though pedantically it's not the arguments that don't change, but the objects they point to.

R.
  

Patch

diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index e94a0cff406..f5beea5bfe9 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -6245,7 +6245,7 @@  lookup_mnemonic (const char *start, int len)
    (if any) and END points to the end of the mnemonic.  */
 
 static templates *
-opcode_lookup (char *base, char *dot, char *end)
+opcode_lookup (const char *base, const char *dot, const char *end)
 {
   const aarch64_cond *cond;
   char condname[16];