Skip to content

Commit 3b07456

Browse files
authored
Merge branch 'main' into timetests
2 parents 78514a7 + caa5c62 commit 3b07456

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ See docs/process.md for more on how version tagging works.
2020

2121
3.1.71 (in development)
2222
-----------------------
23+
- LLVM's `-Wnontrivial-memaccess` warning has been updated to also warn about
24+
passing non-trivially-copyable destrination parameter to `memcpy`,
25+
`memset` and similar functions for which it is a documented undefined
26+
behavior (#22798). See https://github.com/llvm/llvm-project/pull/111434
2327

2428
3.1.70 - 10/25/24
2529
-----------------

test/other/test_strftime_zZ.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
#include <time.h>
55

66
int main() {
7-
void tzset(void);
8-
97
// Buffer to hold the current hour of the day. Format is HH + nul
108
// character.
119
char hour[3];
@@ -20,8 +18,9 @@ int main() {
2018

2119
struct tm tm;
2220

23-
// Get the current timestamp.
24-
const time_t now = time(NULL);
21+
// Use a timestamp corresponding to July 2024, to avoid depending on the
22+
// current time (which may fail e.g. when DST/summer-time changes).
23+
const time_t now = 1719792000;
2524

2625
// What time is that here?
2726
if (localtime_r(&now, &tm) == NULL) {

test/test_core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6748,6 +6748,7 @@ def test_bullet(self, use_cmake):
67486748
'-Wno-format',
67496749
'-Wno-bitfield-constant-conversion',
67506750
'-Wno-int-to-void-pointer-cast',
6751+
'-Wno-nontrivial-memaccess',
67516752
]
67526753

67536754
# extra testing for ASSERTIONS == 2
@@ -6771,7 +6772,7 @@ def test_bullet(self, use_cmake):
67716772
@is_slow_test
67726773
def test_poppler(self):
67736774
# See https://github.com/emscripten-core/emscripten/issues/20757
6774-
self.emcc_args.append('-Wno-deprecated-declarations')
6775+
self.emcc_args.extend(['-Wno-deprecated-declarations', '-Wno-nontrivial-memaccess'])
67756776
poppler = self.get_poppler_library()
67766777
shutil.copy(test_file('poppler/paper.pdf'), '.')
67776778

0 commit comments

Comments
 (0)