File php7-odbc-cmp-int-cast.patch of Package php7

https://bugs.php.net/bug.php?id=53007
Index: php-7.2.12/ext/odbc/php_odbc.c
===================================================================
--- php-7.2.12.orig/ext/odbc/php_odbc.c	2018-11-06 11:48:42.000000000 +0100
+++ php-7.2.12/ext/odbc/php_odbc.c	2018-11-09 16:38:38.694103185 +0100
@@ -1811,7 +1811,7 @@ static void php_odbc_fetch_hash(INTERNAL
 
 				if (rc == SQL_SUCCESS_WITH_INFO) {
 					ZVAL_STRINGL(&tmp, buf, result->longreadlen);
-				} else if (result->values[i].vallen == SQL_NULL_DATA) {
+				} else if ((int)result->values[i].vallen == (int)SQL_NULL_DATA) {
 					ZVAL_NULL(&tmp);
 					break;
 				} else {
@@ -1820,7 +1820,7 @@ static void php_odbc_fetch_hash(INTERNAL
 				break;
 
 			default:
-				if (result->values[i].vallen == SQL_NULL_DATA) {
+				if ((int)result->values[i].vallen == (int)SQL_NULL_DATA) {
 					ZVAL_NULL(&tmp);
 					break;
 				}
@@ -1963,7 +1963,7 @@ PHP_FUNCTION(odbc_fetch_into)
 				}
 				if (rc == SQL_SUCCESS_WITH_INFO) {
 					ZVAL_STRINGL(&tmp, buf, result->longreadlen);
-				} else if (result->values[i].vallen == SQL_NULL_DATA) {
+				} else if ((int)result->values[i].vallen == (int)SQL_NULL_DATA) {
 					ZVAL_NULL(&tmp);
 					break;
 				} else {
@@ -1972,7 +1972,7 @@ PHP_FUNCTION(odbc_fetch_into)
 				break;
 
 			default:
-				if (result->values[i].vallen == SQL_NULL_DATA) {
+				if ((int)result->values[i].vallen == (int)SQL_NULL_DATA) {
 					ZVAL_NULL(&tmp);
 					break;
 				}
@@ -2200,7 +2200,7 @@ PHP_FUNCTION(odbc_result)
 				RETURN_FALSE;
 			}
 
-			if (result->values[field_ind].vallen == SQL_NULL_DATA) {
+			if ((int)result->values[field_ind].vallen == (int)SQL_NULL_DATA) {
 				zend_string_free(field_str);
 				RETURN_NULL();
 			} else if (rc == SQL_NO_DATA_FOUND) {
@@ -2209,7 +2209,7 @@ PHP_FUNCTION(odbc_result)
 			}
 			/* Reduce fieldlen by 1 if we have char data. One day we might
 			   have binary strings... */
-			if ((result->values[field_ind].coltype == SQL_LONGVARCHAR)
+			if (((int)result->values[field_ind].coltype == (int)SQL_LONGVARCHAR)
 #if defined(ODBCVER) && (ODBCVER >= 0x0300)
 			    || (result->values[field_ind].coltype == SQL_WLONGVARCHAR)
 #endif
@@ -2226,7 +2226,7 @@ PHP_FUNCTION(odbc_result)
 			break;
 
 		default:
-			if (result->values[field_ind].vallen == SQL_NULL_DATA) {
+			if ((int)result->values[field_ind].vallen == (int)SQL_NULL_DATA) {
 				RETURN_NULL();
 			} else {
 				RETURN_STRINGL(result->values[field_ind].value, result->values[field_ind].vallen);
@@ -2359,7 +2359,7 @@ PHP_FUNCTION(odbc_result_all)
 					}
 					if (rc == SQL_SUCCESS_WITH_INFO) {
 						PHPWRITE(buf, result->longreadlen);
-					} else if (result->values[i].vallen == SQL_NULL_DATA) {
+					} else if ((int)result->values[i].vallen == (int)SQL_NULL_DATA) {
 						php_printf("<td>NULL</td>");
 						break;
 					} else {
@@ -2368,7 +2368,7 @@ PHP_FUNCTION(odbc_result_all)
 					php_printf("</td>");
 					break;
 				default:
-					if (result->values[i].vallen == SQL_NULL_DATA) {
+					if ((int)result->values[i].vallen == (int)SQL_NULL_DATA) {
 						php_printf("<td>NULL</td>");
 					} else {
 						php_printf("<td>%s</td>", result->values[i].value);