# Proposed Patch: Fix compiler warning in Zend/zend_execute.c

- Thread: https://externals.io/message/40616
- Original archive: https://news-web.php.net/php.internals/40616
- Started by Ilia Cheishvili on 2008-09-23T05:02:11+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #40616 — Ilia Cheishvili — 2008-09-23T05:02:11+00:00

URL: https://externals.io/message/40616#40616

Hi all,

My name is Ilia--I figured that since this is my first patch to the PHP
core, I should refrain from submitting a massive patch and keep it simple.
The patch that I have attached fixes a simple compiler warning within
Zend/zend_execute.c.

The compiler was complaining about comparing signed and unsigned integers.
What I did was wrap the whole block in an if statement that first ensures
that the signed integer in the comparison is greater than or equal to 0 and
then casts it to unsigned and actually does the comparison.  Since the
actual comparison logic is checking to see that an unsigned integer is
larger than the one I am casting, this is all safe.

Also, the entire test suite runs fine and the output is unchanged.  All in
all, I am confident with it.

After having used PHP for so many years, I'm really excited about finally
having found the time to apply my C knowledge and actually start
contributing back to the project :)

Thanks!

Ilia
