Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2da1a5a

Browse files
committed
Fix
```error: reinterpret_cast from 'const __FlashStringHelper *' (aka 'const __attribute__((address_space(1))) char *') to 'const char *' is not allowed```when compiling with Clang
1 parent844e4bf commit2da1a5a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎api/Print.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ size_t Print::write(const uint8_t *buffer, size_t size)
4141
size_tPrint::print(const __FlashStringHelper *ifsh)
4242
{
4343
#if defined(__AVR__)
44+
#if defined(__clang__)
45+
PGM_P p = (PGM_P)(ifsh);
46+
#else
4447
PGM_P p =reinterpret_cast<PGM_P>(ifsh);
48+
#endif
4549
size_t n =0;
4650
while (1) {
4751
unsignedchar c =pgm_read_byte(p++);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp