]> git.ipfire.org Git - thirdparty/openssl.git/commit
OBJ_bsearch_ex_(): Fix const qualifier warning with CHARSET_EBCDIC
authorAbel Tom <abeltom.kernel@gmail.com>
Wed, 13 May 2026 16:18:45 +0000 (18:18 +0200)
committerTomas Mraz <tomas@openssl.foundation>
Mon, 18 May 2026 11:07:01 +0000 (13:07 +0200)
commit413eff874dd7ea34dfaef821f8e81983cd3c6069
tree749989e97bd66f01b7e2918954c1d9d22ba13e64
parent2b5d69caca23d8fc59c20b5a5bee10ef8c2524b7
OBJ_bsearch_ex_(): Fix const qualifier warning with CHARSET_EBCDIC

Fixes #31161

When building with CHARSET_EBCDIC defined,the compiler warns about
discarding the 'const' qualifier when assigning from base_[i * size]
to the non-const pointer p1:

`warning: assignment discards 'const' qualifier from pointer target type`

Change p1 from 'char *' to 'const char *' to maintain const-correctness
since the data being pointed to should not be modified through this
pointer.

Additionally, remove the unused variables l and h that were left over
from a previous implementation of the fallback linear search. These
variables served no purpose and only generated unused variable warnings.

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Mon May 18 11:07:53 2026
(Merged from https://github.com/openssl/openssl/pull/31173)
crypto/objects/obj_dat.c