Sitelet https://github.com/crankyoldgit/IRremoteESP8266/pull/1704
Skip to content

Remove extra const qualifier for char pointer - #1704

Merged
crankyoldgit merged 1 commit into
crankyoldgit:masterfrom
mcspr:patch-1
Dec 16, 2021
Merged

crankyoldgit merged 1 commit into
crankyoldgit:masterfrom
mcspr:patch-1

Conversation

@mcspr

@mcspr mcspr commented Dec 15, 2021

Copy link
Copy Markdown
Contributor

Just like IRtext.cpp macro for flash strings, this does not make sense in the context
Can be seen with build_flags = ... -Wextra

Fixing warnings similar to this

.pio/libdeps/d1_mini/IRremoteESP8266/src/IRac.cpp:3272:13: note: in expansion of macro 'STRCASECMP'
 3272 |            !STRCASECMP(str, kUpStr))
      |             ^~~~~~~~~~
.pio/libdeps/d1_mini/IRremoteESP8266/src/IRac.cpp: In static member function 'static stdAc::swingh_t IRac::strToSwingH(const char*, stdAc::swingh_t)':
.pio/libdeps/d1_mini/IRremoteESP8266/src/IRac.cpp:59:23: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
   59 |     strcasecmp_P(LHS, reinterpret_cast<const char* const>(RHS))
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Just like IRtext.cpp macro for flash strings, this does not make sense in the context

Fixing warnings similar to this
```
.pio/libdeps/d1_mini/IRremoteESP8266/src/IRac.cpp:3272:13: note: in expansion of macro 'STRCASECMP'
 3272 |            !STRCASECMP(str, kUpStr))
      |             ^~~~~~~~~~
.pio/libdeps/d1_mini/IRremoteESP8266/src/IRac.cpp: In static member function 'static stdAc::swingh_t IRac::strToSwingH(const char*, stdAc::swingh_t)':
.pio/libdeps/d1_mini/IRremoteESP8266/src/IRac.cpp:59:23: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
   59 |     strcasecmp_P(LHS, reinterpret_cast<const char* const>(RHS))
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

@crankyoldgit crankyoldgit left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.
Just waiting for the CI tests to finish before I merge it.

@crankyoldgit
crankyoldgit merged commit 31432b4 into crankyoldgit:master Dec 16, 2021
crankyoldgit added a commit that referenced this pull request Dec 31, 2021
_v2.8.1 (20220101)_

**[Bug Fixes]**
- Arduino ESP32 Core v2.0.2+ crashes due to our timer hack. (#1715 #1715)
- SONY: Fix old Sony CD-Player Remote (12 Bit) (#1714)

**[Features]**
- Add tool to convert protocol & code to raw timing info. (#1708 #1707 #1703)
- Add basic support for COOLIX48 protocol. (#1697 #1694)
- MITSUBISHI_AC: Added support for i-SAVE mode. (#1666)
- TOSHIBA_AC: Add Filter setting support. aka. Pure. (#1693 #1692)
- Airton: Add detailed A/C support. (#1688 #1670)

**[Misc]**
- Add a structured library version number. (#1717)
- Workflows Split UnitTests (#1712)
- Reduce time for workflow/Build (#1709)
- Fix some compiler & linter warnings (#1699 #1700)
- Fujitsu: Update supported A/C models (#1690 #1689 #1702 #1701)
- Remove extra `const` qualifier for char pointer (#1704)
- TCL: Update supported devices. (#1698)
- ESP32-C3: Work around for some C3 specific compiler issues. (#1696 #1695)
@crankyoldgit crankyoldgit mentioned this pull request Dec 31, 2021
crankyoldgit added a commit that referenced this pull request Jan 1, 2022
## _v2.8.1 (20220101)_

**[Bug Fixes]**
- Arduino ESP32 Core v2.0.2+ crashes due to our timer hack. (#1715 #1713 )
- SONY: Fix old Sony CD-Player Remote (12 Bit) (#1714)

**[Features]**
- Add tool to convert protocol & code to raw timing info. (#1708 #1707 #1703)
- Add basic support for COOLIX48 protocol. (#1697 #1694)
- MITSUBISHI_AC: Added support for i-SAVE mode. (#1666)
- TOSHIBA_AC: Add Filter setting support. aka. Pure. (#1693 #1692)
- Airton: Add detailed A/C support. (#1688 #1670)

**[Misc]**
- Add a structured library version number. (#1717)
- Workflows Split UnitTests (#1712)
- Reduce time for workflow/Build (#1709)
- Fix some compiler & linter warnings (#1699 #1700)
- Fujitsu: Update supported A/C models (#1690 #1689 #1702 #1701)
- Remove extra `const` qualifier for char pointer (#1704)
- TCL: Update supported devices. (#1698)
- ESP32-C3: Work around for some C3 specific compiler issues. (#1696 #1695)
@crankyoldgit

Copy link
Copy Markdown
Owner

FYI, the changes mentioned above have now been included in the new v2.8.1 release of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants