@@ -473,12 +473,16 @@ snprintf_wrapper(wasm_exec_env_t exec_env, char *str, uint32 size,
473473static int
474474puts_wrapper (wasm_exec_env_t exec_env , const char * str )
475475{
476+ (void )exec_env ;
477+
476478 return os_printf ("%s\n" , str );
477479}
478480
479481static int
480482putchar_wrapper (wasm_exec_env_t exec_env , int c )
481483{
484+ (void )exec_env ;
485+
482486 os_printf ("%c" , c );
483487 return 1 ;
484488}
@@ -585,6 +589,8 @@ strchr_wrapper(wasm_exec_env_t exec_env, const char *s, int32 c)
585589static int32
586590strcmp_wrapper (wasm_exec_env_t exec_env , const char * s1 , const char * s2 )
587591{
592+ (void )exec_env ;
593+
588594 /* s1 and s2 have been checked by runtime */
589595 return strcmp (s1 , s2 );
590596}
@@ -641,6 +647,8 @@ strncpy_wrapper(wasm_exec_env_t exec_env, char *dst, const char *src,
641647static uint32
642648strlen_wrapper (wasm_exec_env_t exec_env , const char * s )
643649{
650+ (void )exec_env ;
651+
644652 /* s has been checked by runtime */
645653 return (uint32 )strlen (s );
646654}
@@ -693,6 +701,7 @@ free_wrapper(wasm_exec_env_t exec_env, void *ptr)
693701static int32
694702atoi_wrapper (wasm_exec_env_t exec_env , const char * s )
695703{
704+ (void )exec_env ;
696705 /* s has been checked by runtime */
697706 return atoi (s );
698707}
@@ -757,20 +766,26 @@ static int32
757766strncasecmp_wrapper (wasm_exec_env_t exec_env , const char * s1 , const char * s2 ,
758767 uint32 n )
759768{
769+ (void )exec_env ;
770+
760771 /* s1 and s2 have been checked by runtime */
761772 return strncasecmp (s1 , s2 , n );
762773}
763774
764775static uint32
765776strspn_wrapper (wasm_exec_env_t exec_env , const char * s , const char * accept )
766777{
778+ (void )exec_env ;
779+
767780 /* s and accept have been checked by runtime */
768781 return (uint32 )strspn (s , accept );
769782}
770783
771784static uint32
772785strcspn_wrapper (wasm_exec_env_t exec_env , const char * s , const char * reject )
773786{
787+ (void )exec_env ;
788+
774789 /* s and reject have been checked by runtime */
775790 return (uint32 )strcspn (s , reject );
776791}
@@ -787,60 +802,80 @@ strstr_wrapper(wasm_exec_env_t exec_env, const char *s, const char *find)
787802static int32
788803isupper_wrapper (wasm_exec_env_t exec_env , int32 c )
789804{
805+ (void )exec_env ;
806+
790807 return isupper (c );
791808}
792809
793810static int32
794811isalpha_wrapper (wasm_exec_env_t exec_env , int32 c )
795812{
813+ (void )exec_env ;
814+
796815 return isalpha (c );
797816}
798817
799818static int32
800819isspace_wrapper (wasm_exec_env_t exec_env , int32 c )
801820{
821+ (void )exec_env ;
822+
802823 return isspace (c );
803824}
804825
805826static int32
806827isgraph_wrapper (wasm_exec_env_t exec_env , int32 c )
807828{
829+ (void )exec_env ;
830+
808831 return isgraph (c );
809832}
810833
811834static int32
812835isprint_wrapper (wasm_exec_env_t exec_env , int32 c )
813836{
837+ (void )exec_env ;
838+
814839 return isprint (c );
815840}
816841
817842static int32
818843isdigit_wrapper (wasm_exec_env_t exec_env , int32 c )
819844{
845+ (void )exec_env ;
846+
820847 return isdigit (c );
821848}
822849
823850static int32
824851isxdigit_wrapper (wasm_exec_env_t exec_env , int32 c )
825852{
853+ (void )exec_env ;
854+
826855 return isxdigit (c );
827856}
828857
829858static int32
830859tolower_wrapper (wasm_exec_env_t exec_env , int32 c )
831860{
861+ (void )exec_env ;
862+
832863 return tolower (c );
833864}
834865
835866static int32
836867toupper_wrapper (wasm_exec_env_t exec_env , int32 c )
837868{
869+ (void )exec_env ;
870+
838871 return toupper (c );
839872}
840873
841874static int32
842875isalnum_wrapper (wasm_exec_env_t exec_env , int32 c )
843876{
877+ (void )exec_env ;
878+
844879 return isalnum (c );
845880}
846881
@@ -899,7 +934,10 @@ __cxa_allocate_exception_wrapper(wasm_exec_env_t exec_env, uint32 thrown_size)
899934
900935static void
901936__cxa_begin_catch_wrapper (wasm_exec_env_t exec_env , void * exception_object )
902- {}
937+ {
938+ (void )exec_env ;
939+ (void )exception_object ;
940+ }
903941
904942static void
905943__cxa_throw_wrapper (wasm_exec_env_t exec_env , void * thrown_exception ,
@@ -908,6 +946,10 @@ __cxa_throw_wrapper(wasm_exec_env_t exec_env, void *thrown_exception,
908946 wasm_module_inst_t module_inst = get_module_inst (exec_env );
909947 char buf [32 ];
910948
949+ (void )thrown_exception ;
950+ (void )tinfo ;
951+ (void )table_elem_idx ;
952+
911953 snprintf (buf , sizeof (buf ), "%s" , "exception thrown by stdc++" );
912954 wasm_runtime_set_exception (module_inst , buf );
913955}
@@ -924,6 +966,8 @@ clock_gettime_wrapper(wasm_exec_env_t exec_env, uint32 clk_id,
924966 wasm_module_inst_t module_inst = get_module_inst (exec_env );
925967 uint64 time ;
926968
969+ (void )clk_id ;
970+
927971 if (!validate_native_addr (ts_app , sizeof (struct timespec_app )))
928972 return (uint32 )- 1 ;
929973
@@ -937,6 +981,8 @@ clock_gettime_wrapper(wasm_exec_env_t exec_env, uint32 clk_id,
937981static uint64
938982clock_wrapper (wasm_exec_env_t exec_env )
939983{
984+ (void )exec_env ;
985+
940986 /* Convert to nano seconds as CLOCKS_PER_SEC in wasi-sdk */
941987
942988 return os_time_get_boot_us () * 1000 ;
0 commit comments