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

Compile chainmaker warning in function check_chainmaker_wallet #1271

Open
PanHH opened this issue Nov 21, 2022 · 0 comments
Open

Compile chainmaker warning in function check_chainmaker_wallet #1271

PanHH opened this issue Nov 21, 2022 · 0 comments
Assignees

Comments

@PanHH
Copy link
Contributor

PanHH commented Nov 21, 2022

Describe the bug
Compile chainmaker warning in function check_chainmaker_wallet

01Wallet.c: In function 'check_chainmaker_wallet':
01Wallet.c:29:22: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness [-Wpointer-sign]
     result = strncmp(wallet_ptr->user_cert_prikey_info.prikeyCtx.extra_data.value, chainmaker_sign_key_buf, strlen(chainmaker_sign_key_buf));
                      ^~~~~~~~~~
In file included from /usr/include/check.h:26:0,
                 from tcase_chainmaker.h:22,
                 from 01Wallet.c:16:
/usr/include/string.h:139:12: note: expected 'const char *' but argument is of type 'BUINT8 * {aka unsigned char *}'
 extern int strncmp (const char *__s1, const char *__s2, size_t __n)
            ^~~~~~~
01Wallet.c:35:22: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness [-Wpointer-sign]
     result = strncmp(wallet_ptr->user_cert_prikey_info.cert.field_ptr, chainmaker_sign_cert_buf, strlen(chainmaker_sign_cert_buf));
                      ^~~~~~~~~~
In file included from /usr/include/check.h:26:0,
                 from tcase_chainmaker.h:22,
                 from 01Wallet.c:16:
/usr/include/string.h:139:12: note: expected 'const char *' but argument is of type 'BUINT8 * {aka unsigned char *}'
 extern int strncmp (const char *__s1, const char *__s2, size_t __n)
            ^~~~~~~
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

No branches or pull requests

2 participants