History

avutil/wchar_filename: Make the header C++ compatible

When compiling decklink, this header is included from a C++ file (albeit inside 'extern "C"') and this causes compilation failures because of an implicit void* -> char* conversion. So add an explicit cast. Fixes ticket #9819.

Andreas Rheinhardt committed 4 years ago

Commit 44541421 parent c471cc71 file · +1 −1Browse files

Unified · Split

libavutil/wchar_filename.h+1−1
@@ -54,7 +54,7 @@ static inline int wchartocp(unsigned int code_page, const wchar_t *filename_w, · 53 unmodified lines
5454 *filename = NULL;
5555 return 0;
5656 }
57− *filename = av_malloc_array(num_chars, sizeof *filename);
57+ *filename = (char*)av_malloc_array(num_chars, sizeof *filename);
5858 if (!*filename) {
5959 errno = ENOMEM;
6060 return -1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t