f481585de471fbd4b0dd3b2d9dcd188e224f4497
cppcheck reports noCopyConstructor and noOperatorEq against GxEPD2_Multi on every e-ink environment (over 80 duplicate pairs on a single heltec-wireless-paper run, one per template instantiation point): src/graphics/GxEPD2Multi.h:123: [medium:warning] Class 'GxEPD2_Multi < GxEPD2_213_FC1 , GxEPD2_213_E0213A367 >' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] The warning is correct. The constructor news one of two GxEPD2_BW drivers into a raw pointer member and caches &driver->epd2 in epd2.m_epd2, so the compiler-generated copy operations would alias that driver: two objects would drive the same panel, and the second to be destroyed would free a driver the first still points at. Nothing copies it - EInkDisplay2 heap-allocates a single instance and holds a pointer - so declare that intent by deleting the copy operations rather than adding a suppression. Also null the unselected driver pointer. Only one of driver0/driver1 is allocated and the other was left indeterminate; every method branches on `which` before dereferencing, so this is latent rather than a live bug, but an indeterminate owning pointer is one refactor away from a wild dereference. Behaviour is unchanged: no caller could have copied this type, and the two added stores only initialize a pointer that is never read. Verified on heltec-wireless-paper: `./bin/check-all.sh heltec-wireless-paper` now reports "No defects found" (exit 0), and `pio run -e heltec-wireless-paper` builds clean. The build matters separately here because syntaxError is suppressed in suppressions.txt, so cppcheck alone would stay green on a malformed declaration. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Overview
This repository contains the official device firmware for Meshtastic, an open-source LoRa mesh networking project designed for long-range, low-power communication without relying on internet or cellular infrastructure. The firmware supports various hardware platforms, including ESP32, nRF52, RP2040/RP2350, and Linux-based devices.
Meshtastic enables text messaging, location sharing, and telemetry over a decentralized mesh network, making it ideal for outdoor adventures, emergency preparedness, and remote operations.
Get Started
- 🔧 Building Instructions - Learn how to compile the firmware from source.
- ⚡ Flashing Instructions - Install or update the firmware on your device.
Join our community and help improve Meshtastic! 🚀
Stats
Releases
1
Languages
C++
72.5%
C
23.7%
Python
2%
Shell
1.2%
Batchfile
0.2%
Other
0.2%
