[
https://issues.apache.org/jira/browse/MESOS-4275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Bannier reassigned MESOS-4275:
---------------------------------------
Assignee: Benjamin Bannier
> duration uses fixed-width types inconsistently
> ----------------------------------------------
>
> Key: MESOS-4275
> URL: https://issues.apache.org/jira/browse/MESOS-4275
> Project: Mesos
> Issue Type: Bug
> Components: stout
> Reporter: Benjamin Bannier
> Assignee: Benjamin Bannier
>
> The implementation of the {{Duration}} class correctly uses fixed-width types
> (here {{int64_t}}) for portability internally, but uses {{long}} types in a
> few places (in particular {{LLONG_MIN}} and {{LLONG_MAX}}). This is
> inconsistent on 64-bit platforms, and probably incorrect on 32-bit as there
> {{long}} is 32 bit wide.
> Additionally, the longer {{Duration}} types ({{Minutes}}, {{Hours}},
> {{Days}}, and {{Weeks}}) construct from {{int32_t}}, while shorter ones take
> {{int64_t}}. Probably as a left-over this is matched with a redundant
> {{Duration}} constructor taking an {{int32_t}} value where the other one
> taking an {{int64_t}} value would be sufficient. It should be safe to just
> construct from {{int64_t}} in all places.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)