Skip to content

MDEV-39870: macOSB Build Warning on Typecast#5189

Open
DaveGosselin-MariaDB wants to merge 1 commit into
10.11from
10.11-mdev-39870-macos-build-warning
Open

MDEV-39870: macOSB Build Warning on Typecast#5189
DaveGosselin-MariaDB wants to merge 1 commit into
10.11from
10.11-mdev-39870-macos-build-warning

Conversation

@DaveGosselin-MariaDB
Copy link
Copy Markdown
Member

On THD::reset, typecast the result of query_start_sec_part() to tv_usec in a more portable way. Previously, we assumed that the left hand side was always long-compatible but that isn't the case on mac.

On THD::reset, typecast the result of query_start_sec_part() to
tv_usec in a more portable way.  Previously, we assumed that the
left hand side was always long-compatible but that isn't the case
on mac.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the reset method in sql/sql_class.h to cast thd->query_start_sec_part() to the type of tv_usec using static_cast<decltype(tv_usec)> instead of a C-style (long) cast. This improves portability across different operating systems, such as macOS, where tv_usec may have a different underlying type. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@DaveGosselin-MariaDB DaveGosselin-MariaDB requested a review from dr-m June 5, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant