GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — gh-83714: Fix compiler warning in stat_nanosecond_timestamp() by vstinner · Pull Request #141043 · python/cpython Conversation
|
|
Fix the warnings: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
!buildbot x86 Debian |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @vstinner for commit c86068e 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F141043%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
https://buildbot.python.org/#/builders/1285/builds/530 confirms that the compiler warnings on |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
On 32-bit, the fast path is not interesting, it only covers seconds in the range [-3; 2]: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| static PyObject * | ||
| stat_nanosecond_timestamp(_posixstate *state, time_t sec, unsigned long nsec) | ||
| { | ||
| #if SIZEOF_LONG >= 8 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I do not think this is correct. The comparison is always true, not always false if SIZEOF_LONG < 8.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Would you mind to elaborate? I'm not sure that I understand your remark. What do you suggest?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Previously, if SIZEOF_LONG < 8, the fast path PyLong_FromLongLong(sec * SEC_TO_NS + nsec) was always used. Now it is never used.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I wrote a different fix: #141069
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think that I now understood my mistake. Sorry about that :-( I read LONG_MIN (32-bit) instead of LLONG_MIN (64-bit).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…python#141043) Disable the fast path on systems with 32-bit long.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.