Opened 4 months ago

Closed 13 days ago

#11103 closed defect (fixed)

Compiler error when casting from void* to char*

Reported by: v0lt Owned by:
Priority: important Component: avutil
Version: git-master Keywords: regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

After this change
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e9e8bea2e79bc3c481a6f81f75f6c871e3e0f367?hp=628ba061c8d5ae018c3e8aa8ce05b8dfcdfd8410
I get an error (сompiler MSVC 19.39.33523):

ffmpeg\libavutil\wchar_filename.h(60,32): error C2440: '=': cannot convert from 'void *' to 'char *'

I explicitly cast the result of the av_malloc_array function to char* and there is no more error.

*filename = (char*)av_malloc_array(num_chars, sizeof **filename);

Please make an explicit cast from void* to char*.

Change History (2)

comment:1 by Marton Balint, 2 weeks ago

Keywords: regression added
Priority: normalimportant
Status: newopen

comment:2 by Marton Balint, 13 days ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.