]> granicus.if.org Git - php/commit
Fixed php_socket_t to int conversion
authorRichard Fussenegger <fleshgrinder@users.noreply.github.com>
Mon, 29 May 2017 19:42:59 +0000 (21:42 +0200)
committerAnatol Belski <ab@php.net>
Thu, 15 Jun 2017 21:48:03 +0000 (23:48 +0200)
commit5fa1cd224b3801a99790f367feca4d98b53771b7
tree7703852ac99aab1f64981bd32fa376dba34f6c70
parentfb6e718764fa33f0f4461c485cd12b89613db9c6
Fixed php_socket_t to int conversion

This warning was about a possible loss of data due to the downcast of `php_socket_t` to `int`. The former maps to a platform specific type, hence, it might downcast from a 64 bit integer to a 32 bit intger.

Fixed possibly overflowing vars

Due to the change from `int` to `php_socket_t` some variables might overflow now. Changed all variables that might be affected.

Revert "Fixed possibly overflowing vars"

This reverts commit bf64fd5984409a208ef32108990a6085b6556273.

Use aliased PHP socket type

Using the alias protects us from changes to the underlying type.

Removed ignored nfds argument

The `nfds` argument to the Win32 `select` function is always ignored, regardless of its actual value. Hence, we should not pass it in the first place. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx for reference.

Target value is not a pointer

Avoid overflow in loop
sapi/cli/php_cli.c
win32/select.c
win32/select.h