aitos-io / BoAT-X-Framework

BoAT-X Blockchain Application Framework for IoT
http://www.aitos.io
Apache License 2.0
926 stars 49 forks source link

Compile warning in function BoatCitaWalletInit #1267

Open PanHH opened 1 year ago

PanHH commented 1 year ago

Describe the bug Compile warning in function BoatCitaWalletInit

api_cita.c: In function 'BoatCitaWalletInit':
api_cita.c:92:51: warning: passing argument 2 of 'BoatCitaWalletSetChainId' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     result = BoatCitaWalletSetChainId(wallet_ptr, &config_ptr->chain_id);
                                                   ^
In file included from /home/john/BoAT-X-Framework/include/boatiotsdk.h:78:0,
                 from /home/john/BoAT-X-Framework/sdk/include/boatinternal.h:37,
                 from api_cita.c:23:
/home/john/BoAT-X-Framework/include/protocolapi/api_cita.h:245:13: note: expected 'BoatWalletChainId * {aka struct TBoatWalletChainId *}' but argument is of type 'const BoatWalletChainId * {aka const struct TBoatWalletChainId *}'
 BOAT_RESULT BoatCitaWalletSetChainId(BoatCitaWallet *wallet_ptr, BoatWalletChainId *wallet_chain_id);
             ^~~~~~~~~~~~~~~~~~~~~~~~