-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix warnings from GCC 13 #3387
Fix warnings from GCC 13 #3387
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#include "processor/operator/persistent/reader/parquet/parquet_timestamp.h" | ||
|
||
#include <cstring> | ||
|
||
namespace kuzu { | ||
namespace processor { | ||
|
||
|
@@ -22,7 +24,8 @@ common::timestamp_t ParquetTimeStampUtils::parquetTimestampNsToTimestamp(const i | |
|
||
int64_t ParquetTimeStampUtils::impalaTimestampToMicroseconds(const Int96& impalaTimestamp) { | ||
int64_t daysSinceEpoch = impalaTimestamp.value[2] - JULIAN_TO_UNIX_EPOCH_DAYS; | ||
auto nanoSeconds = *reinterpret_cast<const int64_t*>(impalaTimestamp.value); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @acquamarin should take a look here and add a test if needed. |
||
int64_t nanoSeconds; | ||
memcpy(&nanoSeconds, &impalaTimestamp.value, sizeof(nanoSeconds)); | ||
auto microseconds = nanoSeconds / NANOSECONDS_PER_MICRO; | ||
return daysSinceEpoch * MICROSECONDS_PER_DAY + microseconds; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,10 +58,10 @@ int mbedtls_ct_memcmp(const void* a, const void* b, size_t n) { | |
* This avoids IAR compiler warning: | ||
* 'the order of volatile accesses is undefined ..' */ | ||
unsigned char x = A[i], y = B[i]; | ||
#pragma GCC diagnostic push | ||
#pragma GCC diagnostic ignored "-Wdeprecated-volatile" | ||
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wdeprecated-volatile" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And now GCC 13 complains that pragma clang is an unknown pragma. I'm not sure we can win this one without globally opting out. |
||
diff |= x ^ y; | ||
#pragma GCC diagnostic pop | ||
#pragma clang diagnostic pop | ||
} | ||
|
||
return ((int)diff); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, was this causing a warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was giving the warning
multi-line comment [-Werror=comment
specifically on the line with the backslashFrom the gcc docs:
Basically it thinks you're trying to use a single line comment as a multi-line by including a backslash+newline:
Because technically the above would be valid.