include/woff2/output.h: add missing <stdint.h> include#176
Open
trofi wants to merge 1 commit intogoogle:masterfrom
Open
include/woff2/output.h: add missing <stdint.h> include#176trofi wants to merge 1 commit intogoogle:masterfrom
trofi wants to merge 1 commit intogoogle:masterfrom
Conversation
atetubou
reviewed
Dec 12, 2024
include/woff2/output.h
Outdated
| #include <algorithm> | ||
| #include <cstring> | ||
| #include <memory> | ||
| #include <stdint.h> |
There was a problem hiding this comment.
It is better to follow
https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
Author
There was a problem hiding this comment.
Sounds good. Changed to the following:
--- a/include/woff2/output.h
+++ b/include/woff2/output.h
@@ -9,10 +9,11 @@
#ifndef WOFF2_WOFF2_OUT_H_
#define WOFF2_WOFF2_OUT_H_
+#include <stdint.h>
+
#include <algorithm>
#include <cstring>
#include <memory>
-#include <stdint.h>
#include <string>
namespace woff2 {Without the change `woff2` build fails on upcoming `gcc-15` as:
In file included from src/woff2_out.cc:9:
include/woff2/output.h:73:25: error: expected ')' before '*' token
73 | WOFF2MemoryOut(uint8_t* buf, size_t buf_size);
| ~ ^
| )
include/woff2/output.h:79:3: error: 'uint8_t' does not name a type
79 | uint8_t* buf_;
| ^~~~~~~
include/woff2/output.h:16:1: note: 'uint8_t' is defined in header '<cstdint>';
this is probably fixable by adding '#include <cstdint>'
15 | #include <string>
+++ |+#include <cstdint>
16 |
3905a7d to
08ece78
Compare
|
@rsheeter could you merge this? This is also necessary for chromium build experimenting C++ modules. |
atetubou
approved these changes
Dec 12, 2024
Member
|
@rsheeter Friendly ping - could you please have a look? It would help us a lot, thank you! 😊 |
aarongable
pushed a commit
to chromium/chromium
that referenced
this pull request
Jan 24, 2025
This is to fix build error when we set use_libcxx_modules=true. I made this as local modification due to the owner of woff2 doesn't respond to merge google/woff2#176. Bug: 40263312 Change-Id: Ie0e35f3b60382c278a9fccdc0b7de4db55447acc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6196756 Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Auto-Submit: Takuto Ikuta <tikuta@chromium.org> Cr-Commit-Position: refs/heads/main@{#1410760}
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without the change
woff2build fails on upcominggcc-15as: