Re: [libdvdcss-devel] ioctl: const correctness

Jean-Baptiste Kempf <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <[email protected]>
On 31 Oct, Diego Biurrun wrote :
> libdvdcss | branch: master | Diego Biurrun <[email protected]> | Fri Oct 31 00:14:26 2014 +0100| [4c8f0b12c8b2df87e4a9dfe06f01a54fbb58c67b] | committer: Diego Biurrun
> 
> ioctl: const correctness

> @@ -901,7 +901,7 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key )
>  /*****************************************************************************
>   * ioctl_InvalidateAgid: invalidate the current AGID
>   *****************************************************************************/
> -int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
> +int ioctl_InvalidateAgid( int i_fd, const int *pi_agid )

This adds warnings on Win32

../src/ioctl.c: In function 'ioctl_InvalidateAgid':
../src/ioctl.c:954:13: warning: passing argument 3 of 'DeviceIoControl' discards 'const' qualifier from pointer target type
     i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_END_SESSION,
             ^
In file included from /usr/i686-w64-mingw32/include/winbase.h:21:0,
                 from /usr/i686-w64-mingw32/include/windows.h:70,
                 from ../src/ioctl.c:41:
/usr/i686-w64-mingw32/include/ioapiset.h:22:29: note: expected 'LPVOID' but argument is of type 'const int *'
   WINBASEAPI WINBOOL WINAPI DeviceIoControl (HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);

With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
_______________________________________________
libdvdcss-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvdcss-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.