-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-1145: Fix development build warnings for numeric type conversions #788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -41,7 +41,7 @@ static PHP_METHOD(CommandException, getResultDocument) | |||
#if PHP_VERSION_ID >= 70000 | |||
resultdocument = zend_read_property(php_phongo_commandexception_ce, getThis(), ZEND_STRL("resultDocument"), 0, &rv TSRMLS_CC); | |||
#else | |||
resultdocument = zend_read_property(php_phongo_commandexception_ce, getThis(), ZEND_STRL("resultDocument"), 0 TSRMLS_CC); | |||
resultdocument = zend_read_property(php_phongo_commandexception_ce, getThis(), ZEND_STRL("resultDocument"), 0 TSRMLS_CC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sigh. Clang-format does other weird things, and they didn't reply to my issue(s) about it at all.
For now, doing the manual git checkout --
dance seems necessary.
@@ -96,7 +96,7 @@ PHP_METHOD(CommandFailedEvent, getOperationId) | |||
return; | |||
} | |||
|
|||
sprintf(int_as_string, "%" PHONGO_LONG_FORMAT, intern->operation_id); | |||
sprintf(int_as_string, "%" PRId64, intern->operation_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, operation_id
and request_id
are unsigned 64-bit integers. These should use PRIu64
instead of PRId64
.
@@ -98,7 +98,7 @@ PHP_METHOD(CommandStartedEvent, getOperationId) | |||
return; | |||
} | |||
|
|||
sprintf(int_as_string, "%" PHONGO_LONG_FORMAT, intern->operation_id); | |||
sprintf(int_as_string, "%" PRId64, intern->operation_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRIu64
in this file for operation_id
and request_id
.
@@ -75,7 +75,7 @@ PHP_METHOD(CommandSucceededEvent, getOperationId) | |||
return; | |||
} | |||
|
|||
sprintf(int_as_string, "%" PHONGO_LONG_FORMAT, intern->operation_id); | |||
sprintf(int_as_string, "%" PRId64, intern->operation_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRIu64
in this file for operation_id
and request_id
.
https://jira.mongodb.org/browse/PHPC-1145