Repository navigation
[0.4.x] libvisual-plugins: Resolve use of function "mremap" in input plug-in "mplayer" (e.g. for macOS) - #277
Merged
Merged
Conversation
This was referenced Feb 13, 2023
kaixiong
reviewed
Feb 14, 2023
| priv->mmap_area = NULL; | ||
|
|
||
| priv->mmap_area = mmap( 0, sizeof( mplayer_data_t ) + buffer_size, | ||
| PROT_READ, MAP_SHARED, priv->fd, 0 ); |
Member
There was a problem hiding this comment.
Is there a need to set mmap_area first to NULL? It looks like mmap() is guaranteed to set mmap_area regardless of success or error.
Same error on all of macOS 10.15, macOS 11, macOS 12: > libtool: compile: clang -DHAVE_CONFIG_H -I. -I../../../../libvisual-plugins-0.4.1/plugins/input/mplayer -I../../.. -I../../../../libvisual-plugins-0.4.1 -I/Users/runner/.local/include/libvisual-0.4 -g -O2 -DUNIX_X -D_REENTRANT -MT input_mplayer.lo -MD -MP -MF .deps/input_mplayer.Tpo -c ../../../../libvisual-plugins-0.4.1/plugins/input/mplayer/input_mplayer.c -fno-common -DPIC -o .libs/input_mplayer.o > ../../../../libvisual-plugins-0.4.1/plugins/input/mplayer/input_mplayer.c:183:20: error: implicit declaration of function 'mremap' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > priv->mmap_area = mremap( priv->mmap_area, sizeof( mplayer_data_t ), > ^ > ../../../../libvisual-plugins-0.4.1/plugins/input/mplayer/input_mplayer.c:183:18: warning: incompatible integer to pointer conversion assigning to 'mplayer_data_t *' from 'int' [-Wint-conversion] > priv->mmap_area = mremap( priv->mmap_area, sizeof( mplayer_data_t ), > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hartwork
force-pushed
the
0.4.x-mplayer-resolve-mremap
branch
from
February 14, 2023 15:27
e3a2e1d to
925f8aa
Compare
kaixiong
approved these changes
Feb 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.