xtext: link against stdc++, fix some clang-tidy warning#1011
xtext: link against stdc++, fix some clang-tidy warning#1011poire-z merged 2 commits intokoreader:masterfrom
Conversation
Linking with -static-libstdc++ might be needed on Kindle and Pocketbook to load (the simple fact of linking against the STL implies ABI compat checks). Also fix some clang-tidy warning about malloc'ing 0 bytes by handling the empty input case apart.
Frenzie
left a comment
There was a problem hiding this comment.
Probably better to include it proactively for Kindle. ;-)
|
Ignoring the other clang-tidy report, as it looks strlcpy is not that good (and needs libbsd), and we get these strings from |
|
The current usage is harmless anyway. (And, yeah, we already enforce |
Reported by valgrind.
|
Last commit fix the last serious memory leak reported by valgrind. See #1010 (comment). The remaining one is in crengine: But for 64 bytes... I'll just add a comment: |
|
Serious memory leak? But, um, the icon is displayed as long as the program exists and then forgotten about. It might technically "leak" in the sense that it's not freed properly on exit, but it just lives & dies with the program. :-P (Unless I'm missing something, it'd only be a leak when changing the icon dynamically.) |
|
Nope, it was the png data pointer that was not free'd. |
|
Sure, sure. It's just that when you say leak I think more "1.4 MB here, 1.4 MB there", even if that only happens over the course of hours or days. But it's 1.4 MB period. (Would it fit on a floppy?) :-) |
Linking with -static-libstdc++ might be needed on Kindle and Pocketbook to load (the simple fact of linking against the STL implies ABI compat checks). koreader/koreader#5598 (comment)
Also fix some clang-tidy warning about malloc'ing 0 bytes by handling the empty input case apart. koreader/koreader#5598 (comment) - even if that's not really an issue:
Let's wait a bit for broken on Kindle reports to validate it's really needed - and in case we find the solution for koreader/koreader#5602 ?
Or merge and bump in case it magically solves it? :)