Hi all,

int ASN1_STRING_set_default_mask_asc(char *p) in crypto/asn1/a_strnid.c is 
unusual in that it doesn't mark its parameter as const, even though it 
doesn't try to modify it. This results in warnings from GCC from code that 
tries to pass a string constant to it, for example:

        if(!ASN1_STRING_set_default_mask_asc("nombstr"))

SetupWizard.cc: In member function ‘virtual bool
   CertRequestPage::CreateNewFileImpl()’:
SetupWizard.cc:847: warning: deprecated conversion from string constant to
   ‘char*’

Would it be possible to change this "char *" parameter to a "const char 
*"? The parameter is only passed to strncmp, strcmp and strtoul. I'm not 
sure about all platforms, but these functions have no business modifying 
their char * argument on any platform.

I think that the internal variable "char* end" would also need to be 
changed to a const char *, or maybe a char * const, I'm not sure.

Thanks in advance, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to