espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.74k stars 7.43k forks source link

Fix missing virtual declarations in Stream.h #10348

Closed TD-er closed 2 months ago

TD-er commented 2 months ago

Description of Change

Fixes some changes made in PR #10328

These changes do cause issues when operating on a Stream pointer instead of the derived class.

github-actions[bot] commented 2 months ago
Warnings
:warning: **Some issues found for the commit messages in this PR:** - the commit message `"Fix missing virtual declarations in Stream.h"`: - *summary* looks empty - *type/action* looks empty - the commit message `"Remove the virtual destructor as Print class has one"`: - *summary* looks empty - *type/action* looks empty *** **Please fix these commit messages** - here are some basic tips: - follow [Conventional Commits style](https://www.conventionalcommits.org/en/v1.0.0/) - correct format of commit message should be: `(): `, for example `fix(esp32): Fixed startup timeout issue` - allowed types are: `change,ci,docs,feat,fix,refactor,remove,revert,test` - sufficiently descriptive message summary should be between 20 to 72 characters and start with upper case letter - avoid Jira references in commit messages (unavailable/irrelevant for our customers) `TIP:` Install pre-commit hooks and run this check when committing (uses the [Conventional Precommit Linter](https://github.com/espressif/conventional-precommit-linter)).

πŸ‘‹ Hello TD-er, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by :no_entry_sign: dangerJS against 70186196db9ea3348709ce25c7d010105614db86

github-actions[bot] commented 2 months ago

Test Results

 56 files   -β€Šβ€‡83   56 suites   -β€Š83   4m 45s :stopwatch: - 1h 37m 11s  21 tests  -β€Šβ€‡β€‡9   21 :white_check_mark:  -β€Šβ€‡β€‡9  0 :zzz: Β±0  0 :x: Β±0  135 runsβ€Š  -β€Š168  135 :white_check_mark:  -β€Š168  0 :zzz: Β±0  0 :x: Β±0 

Results for commit 70186196. ± Comparison against base commit 9e60bbe4.

This pull request removes 9 tests. ``` performance.coremark.test_coremark ‑ test_coremark performance.fibonacci.test_fibonacci ‑ test_fibonacci performance.psramspeed.test_psramspeed ‑ test_psramspeed performance.ramspeed.test_ramspeed ‑ test_ramspeed performance.superpi.test_superpi ‑ test_superpi test_touch_errors test_touch_interrtupt test_touch_read validation.periman.test_periman ‑ test_periman ```

:recycle: This comment has been updated with latest results.

JAndrassy commented 2 months ago

the virtual destructor should be in the Print class

TD-er commented 2 months ago

the virtual destructor should be in the Print class

OK, but the virtual declaration of the other functions should be there.

N.B. the Print class does have a virtual destructor, so I agree it is not needed in the Stream class.

github-actions[bot] commented 2 months ago

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32S30:bangbang: +3K0.00:bangbang: +1.110:warning: +160.00:warning: +0.09
ESP32S20:bangbang: +3K0.00:bangbang: +1.220:warning: +160.00:warning: +0.12
ESP32C30:warning: +11020.00:warning: +0.420:warning: +160.00:warning: +0.14
ESP32C60:warning: +11020.00:warning: +0.510:warning: +160.00:warning: +0.13
ESP32H20:warning: +11080.00:warning: +0.420:warning: +160.00:warning: +0.13
ESP320:bangbang: +3K0.00:bangbang: +1.080:warning: +160.00:warning: +0.08
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
ArduinoOTA/examples/BasicOTA:warning: +4400:warning: +4720:warning: +2880:warning: +2800--:warning: +4360
AsyncUDP/examples/AsyncUDPClient:warning: +5440:warning: +5360:warning: +4140:warning: +4140--:warning: +5440
AsyncUDP/examples/AsyncUDPMulticastServer:warning: +5600:warning: +5360:warning: +4140:warning: +4140--:warning: +5160
AsyncUDP/examples/AsyncUDPServer:warning: +5600:warning: +5440:warning: +4140:warning: +4140--:warning: +5800
BLE/examples/BLE5_extended_scan:warning: +7040--:warning: +2140:warning: +2060:warning: +2140--
BLE/examples/BLE5_multi_advertising:warning: +6760--:warning: +2120:warning: +2200:warning: +2120--
BLE/examples/BLE5_periodic_advertising:warning: +6720--:warning: +2120:warning: +2200:warning: +2120--
BLE/examples/BLE5_periodic_sync:warning: +6600--:warning: +2200:warning: +2120:warning: +2200--
BLE/examples/Beacon_Scanner:warning: +6920--:warning: +2140:warning: +2220:warning: +2220:warning: +7320
BLE/examples/Client:warning: +6760--:warning: +2060:warning: +2140:warning: +2140:warning: +7160
BLE/examples/EddystoneTLM_Beacon:warning: +6800--:warning: +2140:warning: +2060--:warning: +7160
BLE/examples/EddystoneURL_Beacon:warning: +7080--:warning: +2140:warning: +2220--:warning: +7160
BLE/examples/Notify:warning: +6920--:warning: +2140:warning: +2220:warning: +2140:warning: +6960
BLE/examples/Scan:warning: +6680--:warning: +2220:warning: +2140:warning: +2140:warning: +7120
BLE/examples/Server:warning: +7040--:warning: +2120:warning: +2200:warning: +2120:warning: +7120
BLE/examples/Server_multiconnect:warning: +6960--:warning: +2060:warning: +2140:warning: +2060:warning: +7160
BLE/examples/UART:warning: +6880--:warning: +2140:warning: +2220:warning: +2140:warning: +7200
BLE/examples/Write:warning: +6920--:warning: +2100:warning: +2180:warning: +2100:warning: +7200
BLE/examples/iBeacon:warning: +6840--:warning: +2140:warning: +2220:warning: +2140:warning: +7160
DNSServer/examples/CaptivePortal:warning: +4480:warning: +4520:warning: +2320:warning: +2320--:warning: +4640
EEPROM/examples/eeprom_class:warning: +3760:warning: +3760:warning: +3360:warning: +3400:warning: +3400:warning: +3880
EEPROM/examples/eeprom_extra:warning: +3640:warning: +3640:warning: +3420:warning: +3360:warning: +3380:warning: +3760
EEPROM/examples/eeprom_write:warning: +7960:warning: +7960:warning: +3400:warning: +3400:warning: +3400:warning: +8080
ESP32/examples/AnalogOut/LEDCFade:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1004:warning: +16:warning: +1004:warning: +16:warning: +1006:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/AnalogOut/LEDCSingleChannel:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +1010:warning: +16:warning: +1010:warning: +16:warning: +1018:warning: +16:bangbang: +3K:warning: +16
ESP32/examples/AnalogOut/LEDCSoftwareFade:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +1010:warning: +16:warning: +1010:warning: +16:warning: +1018:warning: +16:bangbang: +3K:warning: +16
ESP32/examples/AnalogOut/SigmaDelta:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +998:warning: +16:warning: +1000:warning: +16:warning: +1006:warning: +16:bangbang: +3K:warning: +16
ESP32/examples/AnalogOut/ledcFrequency:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +1022:warning: +16:warning: +1006:warning: +16:warning: +1006:warning: +16:bangbang: +3K:warning: +16
ESP32/examples/AnalogOut/ledcWrite_RGB:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1008:warning: +16:warning: +1012:warning: +16:warning: +1010:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/AnalogRead:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1018:warning: +16:warning: +1010:warning: +16:warning: +1018:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/AnalogReadContinuous:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1002:warning: +16:warning: +996:warning: +16:warning: +1004:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/ArduinoStackSize:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +990:warning: +16:warning: +990:warning: +16:warning: +992:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/CI/CIBoardsTest:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1088:warning: +16:warning: +1082:warning: +16:warning: +1090:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Camera/CameraWebServer:warning: +4360:warning: +4600------:warning: +4480
ESP32/examples/ChipID/GetChipID:warning: +3760:warning: +3680:warning: +3440:warning: +3440:warning: +3420:warning: +3880
ESP32/examples/DeepSleep/ExternalWakeUp:warning: +6920:warning: +6840------:warning: +7120
ESP32/examples/DeepSleep/TimerWakeUp:warning: +6920:warning: +6840:warning: +2060:warning: +2080--:warning: +7120
ESP32/examples/DeepSleep/TouchWakeUp:warning: +6920:warning: +6920------:warning: +6960
ESP32/examples/FreeRTOS/BasicMultiThreading:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1010:warning: +16:warning: +1004:warning: +16:warning: +1014:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/FreeRTOS/Mutex:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1008:warning: +16:warning: +1008:warning: +16:warning: +1012:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/FreeRTOS/Queue:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +998:warning: +16:warning: +998:warning: +16:warning: +1002:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/FreeRTOS/Semaphore:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +996:warning: +16:warning: +996:warning: +16:warning: +998:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/GPIO/BlinkRGB:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +1008:warning: +16:warning: +998:warning: +16:warning: +1008:warning: +16:bangbang: +3K:warning: +16
ESP32/examples/GPIO/FunctionalInterrupt:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1010:warning: +16:warning: +1000:warning: +16:warning: +1008:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/GPIO/FunctionalInterruptStruct:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1010:warning: +16:warning: +1012:warning: +16:warning: +1010:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/GPIO/GPIOInterrupt:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1004:warning: +16:warning: +1006:warning: +16:warning: +1002:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/HWCDC_Events:bangbang: +2K:warning: +16--:warning: +1082:warning: +16:warning: +1078:warning: +16:warning: +1080:warning: +16--
ESP32/examples/MacAddress/GetMacAddress:warning: +7840:warning: +7760:warning: +3460:warning: +3480:warning: +3460:warning: +7960
ESP32/examples/RMT/Legacy_RMT_Driver_Compatible:warning: +6920:warning: +6840:warning: +2100:warning: +2080:warning: +2080:warning: +7120
ESP32/examples/RMT/RMTCallback:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1004:warning: +16:warning: +996:warning: +16:warning: +1006:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/RMT/RMTLoopback:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +996:warning: +16:warning: +996:warning: +16:warning: +996:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/RMT/RMTReadXJT:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1004:warning: +16:warning: +1004:warning: +16:warning: +1004:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/RMT/RMTWrite_RGB_LED:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +990:warning: +16:warning: +990:warning: +16:warning: +990:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/RMT/RMT_CPUFreq_Test:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +998:warning: +16:warning: +998:warning: +16:warning: +998:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/RMT/RMT_EndOfTransmissionState:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1006:warning: +16:warning: +1006:warning: +16:warning: +1006:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/RMT/RMT_LED_Blink:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +998:warning: +16:warning: +1002:warning: +16:warning: +1004:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/ResetReason/ResetReason:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +998:warning: +16:warning: +1000:warning: +16:warning: +1000:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/ResetReason/ResetReason2:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1002:warning: +16:warning: +1002:warning: +16:warning: +1002:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Serial/BaudRateDetect_Demo:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1006:warning: +16:warning: +1010:warning: +16:warning: +1010:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Serial/OnReceiveError_BREAK_Demo:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1002:warning: +16:warning: +1002:warning: +16:warning: +1008:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Serial/OnReceive_Demo:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1004:warning: +16:warning: +1004:warning: +16:warning: +1004:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Serial/RS485_Echo_Demo:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1004:warning: +16:warning: +1006:warning: +16:warning: +1006:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Serial/RxFIFOFull_Demo:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1008:warning: +16:warning: +1008:warning: +16:warning: +1006:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Serial/RxTimeout_Demo:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1000:warning: +16:warning: +998:warning: +16:warning: +1000:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Serial/Serial_All_CPU_Freqs:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1004:warning: +16:warning: +1006:warning: +16:warning: +1006:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Serial/Serial_STD_Func_OnReceive:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +998:warning: +16:warning: +998:warning: +16:warning: +996:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Serial/onReceiveExample:warning: +6680:warning: +6680:warning: +1840:warning: +1860:warning: +1860:warning: +6760
ESP32/examples/TWAI/TWAIreceive:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1008:warning: +16:warning: +1006:warning: +16:warning: +1006:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/TWAI/TWAItransmit:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1018:warning: +16:warning: +1016:warning: +16:warning: +1016:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Template/ExampleTemplate:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +1022:warning: +16:warning: +1016:warning: +16:warning: +1026:warning: +16:bangbang: +3K:warning: +16
ESP32/examples/Time/SimpleTime:warning: +4440:warning: +4640:warning: +3300:warning: +3300--:warning: +4680
ESP32/examples/Timer/RepeatTimer:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1006:warning: +16:warning: +1010:warning: +16:warning: +1010:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Timer/WatchdogTimer:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1008:warning: +16:warning: +1010:warning: +16:warning: +1010:warning: +16:bangbang: +2K:warning: +16
ESP32/examples/Touch/TouchButtonV2:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16--------
ESP32/examples/Touch/TouchInterrupt:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16------:bangbang: +2K:warning: +16
ESP32/examples/Touch/TouchRead:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16------:bangbang: +2K:warning: +16
ESP32/examples/Utilities/HEXBuilder:warning: +7840:warning: +7840:warning: +3320:warning: +3320:warning: +3280:warning: +7960
ESP32/examples/Utilities/MD5Builder:warning: +2840:warning: +2800:warning: +2220:warning: +2220:warning: +2220:warning: +2720
ESP32/examples/Utilities/SHA1Builder:warning: +2840:warning: +2880:warning: +2180:warning: +2180:warning: +2180:warning: +2720
ESP_I2S/examples/ES8388_loopback:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1102:warning: +16:warning: +1102:warning: +16:warning: +1108:warning: +16:bangbang: +2K:warning: +16
ESP_I2S/examples/Record_to_WAV:warning: +8560--------:warning: +8800
ESP_I2S/examples/Simple_tone:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1016:warning: +16:warning: +1026:warning: +16:warning: +1026:warning: +16:bangbang: +2K:warning: +16
ESP_NOW/examples/ESP_NOW_Broadcast_Master:warning: +3840:warning: +3720:warning: +2020:warning: +2120--:warning: +3840
ESP_NOW/examples/ESP_NOW_Broadcast_Slave:warning: +3840:warning: +3800:warning: +2040:warning: +2100--:warning: +4040
ESP_NOW/examples/ESP_NOW_Network:warning: +3800:warning: +3840:warning: +2100:warning: +2180--:warning: +3880
ESP_NOW/examples/ESP_NOW_Serial:warning: +5800:warning: +5520:warning: +4220:warning: +4300--:warning: +5600
ESP_SR/examples/Basic:warning: +4320----------
ESPmDNS/examples/mDNS-SD_Extended:warning: +4320:warning: +4560:warning: +3380:warning: +3480--:warning: +4680
ESPmDNS/examples/mDNS_Web_Server:warning: +3960:warning: +3920:warning: +2700:warning: +2700--:warning: +4120
Ethernet/examples/ETH_W5500_Arduino_SPI:warning: +5480:warning: +5640:warning: +4660:warning: +4660:warning: +4660:warning: +5720
Ethernet/examples/ETH_W5500_IDF_SPI:warning: +5480:warning: +5480:warning: +4660:warning: +4660:warning: +4660:warning: +5720
Ethernet/examples/ETH_WIFI_BRIDGE:warning: +4680:warning: +4360:warning: +3380:warning: +3300--:warning: +4480
FFat/examples/FFat_Test:warning: +7760:warning: +7840:warning: +2400:warning: +2400:warning: +2320:warning: +7960
FFat/examples/FFat_time:warning: +4920:warning: +4920:warning: +2820:warning: +2820--:warning: +5200
HTTPClient/examples/Authorization:warning: +4400:warning: +4320:warning: +2560:warning: +2560--:warning: +4440
HTTPClient/examples/BasicHttpClient:warning: +4400:warning: +4400:warning: +2640:warning: +2640--:warning: +4440
HTTPClient/examples/BasicHttpsClient:warning: +4200:warning: +4480:warning: +2560:warning: +2560--:warning: +4480
HTTPClient/examples/HTTPClientEnterprise:warning: +4640:warning: +4880:warning: +2700:warning: +2700--:warning: +4960
HTTPClient/examples/ReuseConnection:warning: +4320:warning: +4400:warning: +2560:warning: +2560--:warning: +4480
HTTPClient/examples/StreamHttpClient:warning: +4160:warning: +4440:warning: +2660:warning: +2660--:warning: +4440
HTTPUpdate/examples/httpUpdate:warning: +4640:warning: +4840:warning: +3040:warning: +3040--:warning: +4840
HTTPUpdate/examples/httpUpdateSPIFFS:warning: +4560:warning: +4600:warning: +3040:warning: +3040--:warning: +4600
HTTPUpdate/examples/httpUpdateSecure:warning: +4600:warning: +4960:warning: +3200:warning: +3260--:warning: +5040
HTTPUpdateServer/examples/WebUpdater:warning: +4680:warning: +4720:warning: +2480:warning: +2560--:warning: +4760
Insights/examples/DiagnosticsSmokeTest:warning: +4560:warning: +4560:warning: +3300----:warning: +4760
Insights/examples/MinimalDiagnostics:warning: +4640:warning: +4600:warning: +3380----:warning: +4640
LittleFS/examples/LITTLEFS_test:warning: +7920:warning: +7840:warning: +2440:warning: +2440:warning: +2340:warning: +8120
LittleFS/examples/LITTLEFS_time:warning: +4720:warning: +4920:warning: +2820:warning: +2820--:warning: +4840
NetBIOS/examples/ESP_NBNST:warning: +5640:warning: +5360:warning: +4220:warning: +4140--:warning: +5320
NetworkClientSecure/examples/WiFiClientInsecure:warning: +5160:warning: +5320:warning: +3860:warning: +3780--:warning: +5320
NetworkClientSecure/examples/WiFiClientPSK:warning: +5000:warning: +5280:warning: +3860:warning: +3780--:warning: +5320
NetworkClientSecure/examples/WiFiClientSecure:warning: +4880:warning: +5240:warning: +3780:warning: +3700--:warning: +5160
NetworkClientSecure/examples/WiFiClientSecureEnterprise:warning: +5560:warning: +5840:warning: +3840:warning: +3920--:warning: +5800
NetworkClientSecure/examples/WiFiClientSecureProtocolUpgrade:warning: +5280:warning: +5400:warning: +3780:warning: +3860--:warning: +5280
NetworkClientSecure/examples/WiFiClientShowPeerCredentials:warning: +4960:warning: +5200:warning: +3800:warning: +3800--:warning: +5160
NetworkClientSecure/examples/WiFiClientTrustOnFirstUse:warning: +5120:warning: +5240:warning: +3760:warning: +3840--:warning: +5360
PPP/examples/PPP_Basic:warning: +5480:warning: +5560:warning: +4780:warning: +4780:warning: +4700:warning: +5640
PPP/examples/PPP_WIFI_BRIDGE:warning: +4640:warning: +4360:warning: +3380:warning: +3380--:warning: +4600
Preferences/examples/Prefs2Struct:warning: +7960:warning: +7880:warning: +3400:warning: +3400:warning: +3380:warning: +8080
Preferences/examples/StartCounter:warning: +3760:warning: +3880:warning: +3500:warning: +3500:warning: +3480:warning: +3880
RainMaker/examples/RMakerCustom:warning: +4680:warning: +4600:warning: +3360:warning: +3360--:warning: +5520
RainMaker/examples/RMakerCustomAirCooler:warning: +4520:warning: +4640:warning: +3460:warning: +3460--:warning: +4680
RainMaker/examples/RMakerSonoffDualR3:warning: +4560:warning: +4640:warning: +3440:warning: +3440--:warning: +4760
RainMaker/examples/RMakerSwitch:warning: +4720:warning: +4480:warning: +3420:warning: +3420--:warning: +5440
SD/examples/SD_Test:warning: +7760:warning: +7840:warning: +2380:warning: +2400:warning: +2320:warning: +8120
SD/examples/SD_time:warning: +4880:warning: +4680:warning: +2780:warning: +2780--:warning: +5240
SD_MMC/examples/SD2USBMSC:warning: +8280----------
SD_MMC/examples/SDMMC_Test:warning: +7760--------:warning: +8120
SD_MMC/examples/SDMMC_time:warning: +4960--------:warning: +5040
SPI/examples/SPI_Multiple_Buses:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16------:bangbang: +3K:warning: +16
SPIFFS/examples/SPIFFS_Test:warning: +7760:warning: +7840:warning: +2300:warning: +2300:warning: +2300:warning: +8120
SPIFFS/examples/SPIFFS_time:warning: +4720:warning: +4920:warning: +2780:warning: +2780--:warning: +5040
SimpleBLE/examples/SimpleBleDevice:warning: +2600----:warning: +2040:warning: +2040:warning: +3000
TFLiteMicro/examples/hello_world:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +1006:warning: +16:warning: +1004:warning: +16:warning: +1010:warning: +16:bangbang: +3K:warning: +16
Ticker/examples/Blinker:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +1018:warning: +16:warning: +1000:warning: +16:warning: +1006:warning: +16:bangbang: +3K:warning: +16
Ticker/examples/TickerBasic:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +1016:warning: +16:warning: +1000:warning: +16:warning: +1006:warning: +16:bangbang: +3K:warning: +16
Ticker/examples/TickerParameter:bangbang: +3K:warning: +16:bangbang: +3K:warning: +16:warning: +1008:warning: +16:warning: +992:warning: +16:warning: +1000:warning: +16:bangbang: +3K:warning: +16
USB/examples/CompositeDevice:warning: +8680:warning: +8720--------
USB/examples/ConsumerControl:warning: +8520:warning: +8200--------
USB/examples/CustomHIDDevice:warning: +8120:warning: +8120--------
USB/examples/FirmwareMSC:warning: +7800:warning: +7640--------
USB/examples/Gamepad:warning: +8120:warning: +8120--------
USB/examples/HIDVendor:warning: +8280:warning: +8200--------
USB/examples/Keyboard/KeyboardLogout:warning: +8360:warning: +8240--------
USB/examples/Keyboard/KeyboardMessage:warning: +8360:warning: +8240--------
USB/examples/Keyboard/KeyboardReprogram:warning: +8360:warning: +8120--------
USB/examples/Keyboard/KeyboardSerial:warning: +8120:warning: +8120--------
USB/examples/KeyboardAndMouseControl:warning: +8120:warning: +8120--------
USB/examples/MIDI/MidiController:warning: +8120:warning: +8120--------
USB/examples/MIDI/MidiInterface:warning: +8120:warning: +8120--------
USB/examples/MIDI/MidiMusicBox:warning: +8120:warning: +8120--------
USB/examples/MIDI/ReceiveMidi:warning: +8120:warning: +8120--------
USB/examples/Mouse/ButtonMouseControl:warning: +8520:warning: +8120--------
USB/examples/SystemControl:warning: +8360:warning: +8200--------
USB/examples/USBMSC:warning: +7640:warning: +7720--------
USB/examples/USBSerial:warning: +8040:warning: +8080--------
USB/examples/USBVendor:warning: +8280:warning: +8280--------
Update/examples/AWS_S3_OTA_Update:warning: +3440:warning: +3600:warning: +2080:warning: +2160--:warning: +3680
Update/examples/HTTPS_OTA_Update:warning: +3520:warning: +3760:warning: +2380:warning: +2380--:warning: +3800
Update/examples/HTTP_Client_AES_OTA_Update:warning: +4720:warning: +4800:warning: +3100:warning: +3040--:warning: +4920
Update/examples/HTTP_Server_AES_OTA_Update:warning: +5080:warning: +5200:warning: +2640:warning: +2740--:warning: +5040
Update/examples/OTAWebUpdater:warning: +4000:warning: +4120:warning: +1880:warning: +1960--:warning: +4160
Update/examples/SD_Update:warning: +3280:warning: +3240:warning: +1640:warning: +1720:warning: +1720:warning: +3400
WebServer/examples/AdvancedWebServer:warning: +3760:warning: +3680:warning: +1580:warning: +1660--:warning: +3600
WebServer/examples/FSBrowser:warning: +4040:warning: +4200:warning: +1620:warning: +1700--:warning: +4120
WebServer/examples/Filters:warning: +3600:warning: +3600:warning: +1660:warning: +1580--:warning: +3680
WebServer/examples/HelloServer:warning: +3560:warning: +3640:warning: +1660:warning: +1580--:warning: +3720
WebServer/examples/HttpAdvancedAuth:warning: +4040:warning: +4160:warning: +1700:warning: +1780--:warning: +3960
WebServer/examples/HttpAuthCallback:warning: +3800:warning: +4080:warning: +1880:warning: +1800--:warning: +4000
WebServer/examples/HttpAuthCallbackInline:warning: +3880:warning: +4280:warning: +1880:warning: +1780--:warning: +4000
WebServer/examples/HttpBasicAuth:warning: +4000:warning: +4080:warning: +1860:warning: +1780--:warning: +3920
WebServer/examples/HttpBasicAuthSHA1:warning: +4040:warning: +3960:warning: +1820:warning: +1740--:warning: +3960
WebServer/examples/HttpBasicAuthSHA1orBearerToken:warning: +3840:warning: +4000:warning: +1840:warning: +1760--:warning: +4000
WebServer/examples/MultiHomedServers:warning: +3680:warning: +3560:warning: +1660:warning: +1580--:warning: +3720
WebServer/examples/PathArgServer:warning: +3760:warning: +3680:warning: +1500:warning: +1500--:warning: +3800
WebServer/examples/SDWebServer:warning: +4000:warning: +4280:warning: +1780:warning: +1700--:warning: +4080
WebServer/examples/SimpleAuthentification:warning: +3600:warning: +3600:warning: +1580:warning: +1660--:warning: +3600
WebServer/examples/UploadHugeFile:warning: +4360:warning: +4720:warning: +2460:warning: +2300--:warning: +4280
WebServer/examples/WebServer:warning: +4760:warning: +4760:warning: +2580:warning: +2580--:warning: +4720
WebServer/examples/WebUpdate:warning: +3280:warning: +3240:warning: +1040:warning: +960--:warning: +3240
WiFi/examples/FTM/FTM_Initiator:warning: +4560:warning: +4160:warning: +3380:warning: +3460--:warning: +4760
WiFi/examples/FTM/FTM_Responder:warning: +4360:warning: +4440:warning: +3320:warning: +3440--:warning: +4680
WiFi/examples/SimpleWiFiServer:warning: +4240:warning: +4320:warning: +3120:warning: +3200--:warning: +4440
WiFi/examples/WPS:warning: +3440:warning: +3480:warning: +2100:warning: +2020--:warning: +3880
WiFi/examples/WiFiAccessPoint:warning: +4240:warning: +4440:warning: +3120:warning: +3200--:warning: +4640
WiFi/examples/WiFiBlueToothSwitch:warning: +4360--:warning: +3480:warning: +3380--:warning: +4720
WiFi/examples/WiFiClient:warning: +3920:warning: +3880:warning: +2680:warning: +2660--:warning: +4160
WiFi/examples/WiFiClientBasic:warning: +3920:warning: +3920:warning: +2680:warning: +2660--:warning: +4480
WiFi/examples/WiFiClientConnect:warning: +4440:warning: +4640:warning: +3300:warning: +3380--:warning: +4520
WiFi/examples/WiFiClientEnterprise:warning: +3920:warning: +3960:warning: +2660:warning: +2660--:warning: +3960
WiFi/examples/WiFiClientEvents:warning: +4360:warning: +4600:warning: +3300:warning: +3400--:warning: +4520
WiFi/examples/WiFiClientStaticIP:warning: +3920:warning: +3880:warning: +2680:warning: +2680--:warning: +4240
WiFi/examples/WiFiExtender:warning: +4640:warning: +4720:warning: +3460:warning: +3400--:warning: +4680
WiFi/examples/WiFiIPv6:warning: +5080:warning: +5280:warning: +4240:warning: +4160--:warning: +5280
WiFi/examples/WiFiMulti:warning: +4720:warning: +4400:warning: +3380:warning: +3300--:warning: +4480
WiFi/examples/WiFiMultiAdvanced:warning: +5000:warning: +5240:warning: +3780:warning: +3780--:warning: +5520
WiFi/examples/WiFiScan:warning: +4560:warning: +4360:warning: +3380:warning: +3300--:warning: +4800
WiFi/examples/WiFiScanAsync:warning: +4480:warning: +4320:warning: +3400:warning: +3300--:warning: +4840
WiFi/examples/WiFiScanDualAntenna:warning: +4600:warning: +4400:warning: +3380:warning: +3480--:warning: +4680
WiFi/examples/WiFiScanTime:warning: +4280:warning: +4320:warning: +3480:warning: +3380--:warning: +4680
WiFi/examples/WiFiSmartConfig:warning: +4400:warning: +4480:warning: +3320:warning: +3380--:warning: +4560
WiFi/examples/WiFiTelnetToSerial:warning: +5480:warning: +5400:warning: +4620:warning: +4700--:warning: +5560
WiFi/examples/WiFiUDPClient:warning: +4080:warning: +4200:warning: +2980:warning: +2920--:warning: +4480
WiFiProv/examples/WiFiProv:warning: +4040:warning: +4560:warning: +3380:warning: +3380--:warning: +4680
Wire/examples/WireMaster:warning: +3840:warning: +3960:warning: +3040:warning: +3000:warning: +3000:warning: +4000
Wire/examples/WireScan:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1082:warning: +16:warning: +1078:warning: +16:warning: +1076:warning: +16:bangbang: +2K:warning: +16
Wire/examples/WireSlave:bangbang: +2K:warning: +16:bangbang: +2K:warning: +16:warning: +1086:warning: +16:warning: +1076:warning: +16:warning: +1074:warning: +16:bangbang: +2K:warning: +16
OpenThread/examples/COAP/coap_lamp------:warning: +2220:warning: +2240--
OpenThread/examples/COAP/coap_switch------:warning: +2140:warning: +2140--
OpenThread/examples/SimpleCLI------:warning: +2560:warning: +2660--
OpenThread/examples/SimpleNode------:warning: +2400:warning: +2460--
OpenThread/examples/SimpleThreadNetwork/ExtendedRouterNode------:warning: +2400:warning: +2440--
OpenThread/examples/SimpleThreadNetwork/LeaderNode------:warning: +2580:warning: +2680--
OpenThread/examples/SimpleThreadNetwork/RouterNode------:warning: +2600:warning: +2660--
OpenThread/examples/ThreadScan------:warning: +2140:warning: +2220--
OpenThread/examples/onReceive------:warning: +2660:warning: +2660--
BluetoothSerial/examples/DiscoverConnect----------:warning: +4800
BluetoothSerial/examples/GetLocalMAC----------:warning: +4640
BluetoothSerial/examples/SerialToSerialBT----------:warning: +4880
BluetoothSerial/examples/SerialToSerialBTM----------:warning: +4880
BluetoothSerial/examples/SerialToSerialBT_Legacy----------:warning: +4280
BluetoothSerial/examples/SerialToSerialBT_SSP----------:warning: +4440
BluetoothSerial/examples/bt_classic_device_discovery----------:warning: +5040
BluetoothSerial/examples/bt_remove_paired_devices----------:warning: +4720
ESP32/examples/DeepSleep/SmoothBlink_ULP_Code----------:bangbang: +2K:warning: +16
ESP32/examples/Touch/TouchButton----------:bangbang: +2K:warning: +16
Ethernet/examples/ETH_LAN8720----------:warning: +5800
Ethernet/examples/ETH_TLK110----------:warning: +5800
me-no-dev commented 2 months ago

@TD-er have you thought of proposing this upstream?

TD-er commented 2 months ago

@TD-er have you thought of proposing this upstream?

Nope, as I don't know why it was already different on this repo to begin with.

To me it makes perfect sense why those functions should be virtual, but I can't think of any reason why they are not made virtual in the upstream code. Nor can I oversee what effect it may have on small microcontrollers as marking it virtual may add some to the build size and I guess Stream.h may be used in quite a lot of code.

me-no-dev commented 2 months ago

it also adds up to 3K of flash here too. Should you maybe rethink your code and not overwrite those?

TD-er commented 2 months ago

It does make both ESP32 and ESP8266 implementations different. Also I don't know which other libraries may break because of this.

Not sure what will happen when calling these functions when you have a pointer to the Stream base class, I guess then the implementation of the derived class will not be called right?

me-no-dev commented 2 months ago

You can give it a shot. I think the derived class will be called.

TD-er commented 2 months ago

You can give it a shot. I think the derived class will be called.

Nope, it will not. See: https://www.programiz.com/cpp-programming/virtual-functions

However, according to this, we could declare these functions with override in the Stream class? (see linked page roughly half way) Then it isn't declared virtual. This should reduce the bin file a bit, though I don't think it will be the same size as it is now.

N.B. I don't know if I understood this alternative option 100% correct, so if I didn't please point me to the correct documentation or links to the standard or some examples.

JAndrassy commented 2 months ago

override specifier (since C++11) Specifies that a virtual function overrides another virtual function.

compiler will check if a virtual function with the specified name and parameters exists in the base class

TD-er commented 2 months ago

override specifier (since C++11) Specifies that a virtual function overrides another virtual function.

compiler will check if a virtual function with the specified name and parameters exists in the base class

Yep, that's how I found this as the compiler complained.

However the question is if we could do without virtual here? If not, then it is for sure also a bug in the upstream Arduino code.