[CDRIVER-4789] prevent -Werror=conversion with GCC 12 Created: 27/Nov/23 Updated: 29/Nov/23 Resolved: 29/Nov/23 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.25.2 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Kevin Albertson | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Tracks: https://github.com/mongodb/mongo-c-driver/pull/1479/ |
| Comments |
| Comment by Githook User [ 29/Nov/23 ] | |
|
Author: {'name': 'Roland Hieber', 'email': 'rohieb@users.noreply.github.com', 'username': 'rohieb'}Message:
Building fails with GCC 12.3: bson-iter.h:434:33: error: conversion from 'int64_t' {aka 'long long int'}to '__suseconds_t' {aka 'long int'} may change value [-Werror=conversion]
Do the same as with tv->tv_sec, and explicitely cast it to suseconds_t
This matches specificiation in POSIX 2008. | |
| Comment by Githook User [ 29/Nov/23 ] | |
|
Author: {'name': 'Roland Hieber', 'email': 'rohieb@users.noreply.github.com', 'username': 'rohieb'}Message:
Building fails with GCC 12.3: bson-iter.h:434:33: error: conversion from 'int64_t' {aka 'long long int'}to '__suseconds_t' {aka 'long int'} may change value [-Werror=conversion]
Do the same as with tv->tv_sec, and explicitely cast it to suseconds_t
This matches specificiation in POSIX 2008. |