Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some conversion errors #352

Closed
wants to merge 0 commits into from
Closed

Fixed some conversion errors #352

wants to merge 0 commits into from

Conversation

EMG60
Copy link
Contributor

@EMG60 EMG60 commented Jan 27, 2024

Fixed some conversion errors

@tuffnatty
Copy link
Member

Hi @EMG60,

  1. Your ChangeLog entry mentions nonexistent paths.
  2. It's not clear what you're trying to fix and on what platform, the strict CI builds don't produce any warnings in these places. I generally support fixing my code (contrib/hbsqlit3/core.c), but I would probably introduce an extra variable instead of repeating const char * twice, and I would like to be able to reproduce the warning/error here, which our CI builds do not show at the moment.
  3. Also, my experience tells me that adding a commit including both core and contrib changes, or two different contribs, should be discouraged as the Git history is harder to grok then, and cherry-picking individual changes is harder. Yours are separate commits, but would have to be squash-merged by a committer, if one decides to merge them.

@EMG60
Copy link
Contributor Author

EMG60 commented Jan 27, 2024

  1. Sorry, only a typo: contrib/hbsqlit3/core.c
  2. I get the conversion errors using Microsoft C++ 2022 32-bit
  3. Do you want me to split the two commits? I can do it, no problem. Please confirm.

@EMG60
Copy link
Contributor Author

EMG60 commented Jan 27, 2024

Please note: they are errors which prevent building Harbour with Microsoft C++ 2022.

@EMG60
Copy link
Contributor Author

EMG60 commented Jan 27, 2024

  1. Sorry, only a typo: contrib/hbsqlit3/core.c

Fixed.

@EMG60
Copy link
Contributor Author

EMG60 commented Jan 27, 2024

This is a reduced sample of the problem:

void test( const unsigned char *p )
{
( void ) p;
}

int main()
{
const unsigned char *p = 1;

test( p );

return 0;

}

@EMG60
Copy link
Contributor Author

EMG60 commented Jan 28, 2024

Please, let me know what I have to do to get my pull request committed,

@EMG60
Copy link
Contributor Author

EMG60 commented Jan 28, 2024

This is the error I get with MSC32 and current repository:

..\contrib\hbssl\rsa.c(117): error C2664: 'int RSA_public_encrypt(int,const unsigned char *,unsigned char *,RSA *,int)': cannot convert argument 2 from 'void *' to 'const unsigned char '
..\contrib\hbssl\rsa.c(117): note: Conversion from 'void
' to pointer to non-'void' requires an explicit cast
e:\hrbbld\openssl\x86\include\openssl/rsa.h(288): note: see declaration of 'RSA_public_encrypt' (compiling source file ..\contrib\hbssl\rsa.c)

@EMG60
Copy link
Contributor Author

EMG60 commented Jan 28, 2024

Many thanks to Przemek for the fixes! They are working fine here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants