Skip to content
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

fix [-Wformat=] warning on 32-bit #1750

Merged
merged 1 commit into from May 6, 2020
Merged

fix [-Wformat=] warning on 32-bit #1750

merged 1 commit into from May 6, 2020

Conversation

@remicollet
Copy link
Collaborator

remicollet commented May 6, 2020

/builddir/build/BUILD/php-pecl-redis5-5.2.2/NTS/redis_array.c: In function 'zim_RedisArray_mget':
/builddir/build/BUILD/php-pecl-redis5-5.2.2/NTS/redis_array.c:944:55: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  944 |             key_len = snprintf(kbuf, sizeof(kbuf), "%ld", Z_LVAL_P(data));
      |                                                     ~~^
      |                                                       |
      |                                                       long int
      |                                                     %d
/builddir/build/BUILD/php-pecl-redis5-5.2.2/NTS/redis_array.c: In function 'zim_RedisArray_mset':
/builddir/build/BUILD/php-pecl-redis5-5.2.2/NTS/redis_array.c:1070:55: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'zend_ulong' {aka 'unsigned int'} [-Wformat=]
 1070 |             key_len = snprintf(kbuf, sizeof(kbuf), "%lu", idx);
      |                                                     ~~^   ~~~
      |                                                       |   |
      |                                                       |   zend_ulong {aka unsigned int}
      |                                                       long unsigned int
      |                                                     %u
/builddir/build/BUILD/php-pecl-redis5-5.2.2/NTS/cluster_library.c: In function 'cluster_hash_key_zval':
/builddir/build/BUILD/php-pecl-redis5-5.2.2/NTS/cluster_library.c:566:48: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  566 |             klen = snprintf(buf,sizeof(buf),"%ld",Z_LVAL_P(z_key));
      |                                              ~~^
      |                                                |
      |                                                long int
      |                                              %d
/builddir/build/BUILD/php-pecl-redis5-5.2.2/NTS/redis_cluster.c: In function 'cluster_cmd_get_slot':
/builddir/build/BUILD/php-pecl-redis5-5.2.2/NTS/redis_cluster.c:2247:63: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'zend_long' {aka 'int'} [-Wformat=]
 2247 |             php_error_docref(0, E_WARNING, "Unknown node %s:%ld",
      |                                                             ~~^
      |                                                               |
      |                                                               long int
      |                                                             %d

@remicollet remicollet requested a review from michael-grunder May 6, 2020
@michael-grunder michael-grunder merged commit b9b383f into develop May 6, 2020
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@michael-grunder
Copy link
Member

michael-grunder commented May 6, 2020

Merged, thank you!

@yatsukhnenko yatsukhnenko deleted the issue-format branch May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.