Skip to content

Commit 3cd0d11

Browse files
committed
Remove int cast to avoid warnings on 32-bit platforms
1 parent 1cd5d03 commit 3cd0d11

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

tests/cursor/cursor-session-001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $iterator = new IteratorIterator($cursor);
2626
$iterator->rewind();
2727
$iterator->next();
2828

29-
printf("Cursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no');
29+
printf("Cursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no');
3030
var_dump($cursor);
3131

3232
$iterator->next();
@@ -35,7 +35,7 @@ $iterator->next();
3535
* is exhausted. While this is primarily done to ensure implicit sessions for
3636
* command cursors are returned to the pool ASAP, it also applies to explicit
3737
* sessions. */
38-
printf("\nCursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no');
38+
printf("\nCursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no');
3939
var_dump($cursor);
4040

4141
?>

tests/cursor/cursor-session-002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ $iterator->next();
2828
/* Implicit sessions for query cursors are never exposed to PHPC, as they are
2929
* handled internally by libmongoc. Cursor debug ouput should never report such
3030
* sessions. */
31-
printf("Cursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no');
31+
printf("Cursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no');
3232
var_dump($cursor);
3333

3434
$iterator->next();
3535

36-
printf("\nCursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no');
36+
printf("\nCursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no');
3737
var_dump($cursor);
3838

3939
?>

tests/cursor/cursor-session-003.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $iterator = new IteratorIterator($cursor);
3030
$iterator->rewind();
3131
$iterator->next();
3232

33-
printf("Cursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no');
33+
printf("Cursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no');
3434
var_dump($cursor);
3535

3636
$iterator->next();
@@ -39,7 +39,7 @@ $iterator->next();
3939
* is exhausted. While this is primarily done to ensure implicit sessions for
4040
* command cursors are returned to the pool ASAP, it also applies to explicit
4141
* sessions. */
42-
printf("\nCursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no');
42+
printf("\nCursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no');
4343
var_dump($cursor);
4444

4545
?>

tests/cursor/cursor-session-004.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $iterator = new IteratorIterator($cursor);
2929
$iterator->rewind();
3030
$iterator->next();
3131

32-
printf("Cursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no');
32+
printf("Cursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no');
3333
var_dump($cursor);
3434

3535
$iterator->next();
@@ -38,7 +38,7 @@ $iterator->next();
3838
* libmongoc, PHPC-1152 emulates its own implicit sessions for command cursors
3939
* in order to ensure that command cursors always share the same session as the
4040
* originating command. */
41-
printf("\nCursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no');
41+
printf("\nCursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no');
4242
var_dump($cursor);
4343

4444
?>

0 commit comments

Comments
 (0)