Skip to content

Fix: incompatible pointer types#34

Open
Jamaika1 wants to merge 2 commits intopkuvcl:masterfrom
Jamaika1:patch-2
Open

Fix: incompatible pointer types#34
Jamaika1 wants to merge 2 commits intopkuvcl:masterfrom
Jamaika1:patch-2

Conversation

@Jamaika1
Copy link

No description provided.

Jamaika1 added 2 commits June 15, 2024 08:17
```
parameters.c: In function 'get_param_name':
parameters.c:447:18: warning: passing argument 1 of 'strtok' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  447 |     str = strtok(param_item, "_");
      |                  ^~~~~~~~~~
In file included from parameters.c:47:
C:/gcc1500/x86_64-w64-mingw32/include/string.h:97:44: note: expected 'char * restrict' but argument is of type 'const char *'
   97 |   char *__cdecl strtok(char * __restrict__ _Str,const char * __restrict__ _Delim) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
      |                        ~~~~~~~~~~~~~~~~~~~~^~~~
```
```
parameters.c: In function 'xavs2_encoder_opt_set':
parameters.c:632:45: error: passing argument 2 of 'xavs2_get_configs' from incompatible pointer type [-Wincompatible-pointer-types]
  632 |     if ((contents = xavs2_get_configs(argc, argv)) == NULL) {
      |                                             ^~~~
      |                                             |
      |                                             char **
parameters.c:531:62: note: expected 'const char * const*' but argument is of type 'char **'
  531 | static char *xavs2_get_configs(int argc, const char * const *argv)
      |                                          ~~~~~~~~~~~~~~~~~~~~^~~~
```
```
encoder.c:2041:56: error: passing argument 2 of 'xavs2_threadpool_run' from incompatible pointer type [-Wincompatible-pointer-types]
 2041 |         xavs2_threadpool_run(h->h_top->threadpool_aec, encoder_aec_encode_one_frame, h, 0);
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                        |
      |                                                        void * (*)(xavs2_t *)
In file included from wrapper.h:41,
                 from encoder.c:39:
threadpool.h:46:65: note: expected 'void * (*)(void *)' but argument is of type 'void * (*)(xavs2_t *)'
   46 | void  xavs2_threadpool_run   (xavs2_threadpool_t *pool, void *(*func)(void *), void *arg, int wait_sign);
      |                                                         ~~~~~~~~^~~~~~~~~~~~~
```
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.

1 participant