[libdvdnav-devel] [Git][videolan/libdvdread][master] 4 commits: Silence warnings
Petri Hintukainen
gitlab at videolan.org
Sat Apr 10 13:38:32 UTC 2021
Petri Hintukainen pushed to branch master at VideoLAN / libdvdread
Commits:
9ba15098 by Petri Hintukainen at 2021-04-10T16:06:45+03:00
Silence warnings
- - - - -
dc1caa06 by Petri Hintukainen at 2021-04-10T16:06:45+03:00
dlfcn: make sure path is nul-terminated after strncpy()
- - - - -
939671fb by Petri Hintukainen at 2021-04-10T16:06:45+03:00
Silence unused variable warning (_WIN32)
- - - - -
f56bef30 by Petri Hintukainen at 2021-04-10T16:06:45+03:00
Drop unused include and define
- - - - -
2 changed files:
- msvc/contrib/dlfcn.c
- src/dvd_reader.c
Changes:
=====================================
msvc/contrib/dlfcn.c
=====================================
@@ -17,6 +17,7 @@ void *dlopen(const char *module_name, int mode)
UINT em;
HINSTANCE dsoh;
char path[MAX_PATH], *p;
+ (void)mode;
/* Load the module...
* per PR2555, the LoadLibraryEx function is very picky about slashes.
* Debugging on NT 4 SP 6a reveals First Chance Exception within NTDLL.
@@ -26,8 +27,9 @@ void *dlopen(const char *module_name, int mode)
* Transpose '\' for '/' in the filename.
*/
(void)strncpy(path, module_name, MAX_PATH);
+ path[MAX_PATH - 1] = 0;
p = path;
- while (p = strchr(p, '/'))
+ while ((p = strchr(p, '/')))
*p = '\\';
/* First assume the dso/dll's required by -this- dso are sitting in the
=====================================
src/dvd_reader.c
=====================================
@@ -49,8 +49,6 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz )
}
# define gettimeofday(TV, TZ) _private_gettimeofday((TV), (TZ))
# endif
-# include <io.h> /* read() */
-# define lseek64 _lseeki64
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__APPLE__)
@@ -336,7 +334,7 @@ static dvd_reader_t *DVDOpenCommon( void *priv,
dvd_reader_stream_cb *stream_cb )
{
struct stat fileinfo;
- int ret, have_css, retval, cdir = -1;
+ int ret, have_css, cdir = -1;
char *dev_name = NULL;
char *path = NULL, *new_path = NULL, *path_copy = NULL;
dvd_reader_t *ctx = calloc(1, sizeof(*ctx));
@@ -450,6 +448,7 @@ static dvd_reader_t *DVDOpenCommon( void *priv,
/* Resolve any symlinks and get the absolute dir name. */
{
if( ( cdir = open( ".", O_RDONLY ) ) >= 0 ) {
+ int retval;
if( chdir( path_copy ) == -1 ) {
goto DVDOpen_error;
}
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/04d2b7f2080d2f04beed4c3c58938e6c95894ae1...f56bef305b86755415200a137b7acc70889c87bf
--
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/04d2b7f2080d2f04beed4c3c58938e6c95894ae1...f56bef305b86755415200a137b7acc70889c87bf
You're receiving this email because of your account on code.videolan.org.
More information about the libdvdnav-devel
mailing list