mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-08-02 13:56:54 +00:00
CONPY-189: Windows build fix for Visual Studio 2022
- Build parameters are now written to config_win.h instead of passing them as command line parameters - Fixed several compiler warnings
This commit is contained in:
@ -392,10 +392,10 @@ static PyObject *Mrdb_GetTimeDelta(MYSQL_TIME *tm)
|
||||
{
|
||||
int days, hour, minute, second, second_part;
|
||||
|
||||
hour= (tm->neg) ? -tm->hour : tm->hour;
|
||||
minute= (tm->neg) ? -tm->minute : tm->minute;
|
||||
second= (tm->neg) ? -tm->second : tm->second;
|
||||
second_part= (tm->neg) ? -tm->second_part : tm->second_part;
|
||||
hour= (tm->neg) ? -1 * tm->hour : tm->hour;
|
||||
minute= (tm->neg) ? -1 * tm->minute : tm->minute;
|
||||
second= (tm->neg) ? -1 * tm->second : tm->second;
|
||||
second_part= (tm->neg) ? -1 * tm->second_part : tm->second_part;
|
||||
|
||||
days= hour / 24;
|
||||
hour= hour % 24;
|
||||
@ -1432,7 +1432,7 @@ int clock_gettime(int dummy, struct timespec *ct)
|
||||
}
|
||||
|
||||
ct->tv_sec = count.QuadPart / g_counts_per_sec.QuadPart;
|
||||
ct->tv_nsec = ((count.QuadPart % g_counts_per_sec.QuadPart) * 1E09) / g_counts_per_sec.QuadPart;
|
||||
ct->tv_nsec = (long)(((count.QuadPart % g_counts_per_sec.QuadPart) * 1E09) / g_counts_per_sec.QuadPart);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user