Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing virtual destructor results in compiler warning #153

Merged
merged 1 commit into from
Dec 15, 2021
Merged

Missing virtual destructor results in compiler warning #153

merged 1 commit into from
Dec 15, 2021

Conversation

fredlcore
Copy link
Contributor

When deleteing an EthernetClient object, the compiler throws the following warning:
warning: deleting object of polymorphic class type 'EthernetClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
Adding a virtual destructor solves this problem, see also here:
https://stackoverflow.com/questions/43282826/suppress-delete-non-virtual-dtor-warning-when-using-a-protected-non-virtual-dest

When `delete`ing an EthernetClient object, the compiler throws the following warning:
`warning: deleting object of polymorphic class type 'EthernetClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]`
Adding a virtual destructor solves this problem, see also here:
https://stackoverflow.com/questions/43282826/suppress-delete-non-virtual-dtor-warning-when-using-a-protected-non-virtual-dest
@aentinger aentinger merged commit 473cfeb into arduino-libraries:master Dec 15, 2021
@fredlcore fredlcore deleted the patch-1 branch December 15, 2021 12:02
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Feb 21, 2022
stevstrong added a commit to stevstrong/Ethernet that referenced this pull request Mar 15, 2024
* esp8266 arduino core compatibility

* remove unused warning

* remove useless comment

from @per1234

Co-Authored-By: d-a-v <gauchard@laas.fr>

* For Arduino MKR Vidor-4000

* PagerServer example - how server.available() and server.print() works

* Configure Dependabot to check for outdated actions used in workflows

Dependabot will periodically check the versions of all actions used in the repository's workflows. If any are found to
be outdated, it will submit a pull request to update them.
NOTE: Dependabot's PRs will sometimes try to pin to the patch version of the action (e.g., updating `uses: foo/bar@v1`
to `uses: foo/bar@v2.3.4`). When the action author has provided a major version ref, use that instead
(e.g., `uses: foo/bar@v2`). Dependabot will automatically close its PR once the workflow has been updated.
More information:
https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot

* Add CI workflow to check for commonly misspelled words

On every push, pull request, and periodically, use the codespell-project/actions-codespell action to check for commonly
misspelled words.

In the event of a false positive, the problematic word should be added, in all lowercase, to the ignore-words-list field
of ./.codespellrc. Regardless of the case of the word in the false positive, it must be in all lowercase in the ignore
list. The ignore list is comma-separated with no spaces.

* Correct typos in comments and documentation

* Add CI workflow to do Arduino project-specific linting

On every push, pull request, and periodically, run Arduino Lint to check for common problems not related to the project
code.

* Add "smoke test" examples compilation CI workflow

On every push or pull request that affects library source or example files, and periodically, compile all example
sketches for the specified boards.

* Report changes in memory usage that would result from merging a PR

On creation or commit to a pull request, a report of the resulting change in memory usage of the examples will be
commented to the PR thread.

* Fix compiler warning in htons

* change links to https if possible (arduino-libraries#66)

* Add docs

* Added pinout

* Adding sync-labels workflow for sharing one set of labels across all repos. (arduino-libraries#178)

* Missing virtual destructor results in compiler warning (arduino-libraries#153)

When `delete`ing an EthernetClient object, the compiler throws the following warning:
`warning: deleting object of polymorphic class type 'EthernetClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]`
Adding a virtual destructor solves this problem, see also here:
https://stackoverflow.com/questions/43282826/suppress-delete-non-virtual-dtor-warning-when-using-a-protected-non-virtual-dest

* rename sockindex to _sockindex

private variable in this class begin with _

* Fixing spelling error within examples/PagerServer. (arduino-libraries#179)

* Fixing CI build for Arduino SAM Due. (arduino-libraries#180)

The class EthernetServer, derived from Server, derived from Print does not contain a 'flush' method as for all other cores.

* same mac for all examples

* Use major version ref of `carlosperate/download-file-action` (arduino-libraries#181)

The `carlosperate/download-file-action` action is used in the GitHub Actions workflows as a convenient way to download
external resources.

A major version ref has been added to that repository. It will always point to the latest release of the "1" major
version series. This means it is no longer necessary to do a full pin of the action version in use as before.

Use of the major version ref will cause the workflow to use a stable version of the action, while also benefiting from
ongoing development to the action up until such time as a new major release of an action is made. At that time we would
need to evaluate whether any changes to the workflow are required by the breaking change that triggered the major
release before manually updating the major ref (e.g., uses: `carlosperate/download-file-action@v2`). I think this
approach strikes the right balance between stability and maintainability for these workflows.

* Standardize format of example sketch titles

* Correct typos in documentation

* Bump actions/checkout from 2 to 3

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update api.md

* Update api.md

* Update api.md

* Bump actions/upload-artifact from 2 to 3

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump actions/download-artifact from 2 to 3

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update api.md

Fix: Adding missing Bullet Points to Parameters and Returns

* Remove Paul Stoffregen from list of library maintainers

Done at the request of Paul Stoffregen.

* Release v2.0.1.

* Bump geekyeggo/delete-artifact from 1 to 2

Bumps [geekyeggo/delete-artifact](https://github.com/geekyeggo/delete-artifact) from 1 to 2.
- [Release notes](https://github.com/geekyeggo/delete-artifact/releases)
- [Commits](GeekyEggo/delete-artifact@v1...v2)

---
updated-dependencies:
- dependency-name: geekyeggo/delete-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump carlosperate/download-file-action from 1 to 2

Bumps [carlosperate/download-file-action](https://github.com/carlosperate/download-file-action) from 1 to 2.
- [Release notes](https://github.com/carlosperate/download-file-action/releases)
- [Commits](carlosperate/download-file-action@v1...v2)

---
updated-dependencies:
- dependency-name: carlosperate/download-file-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fixes static IPs for Arduino Nano Every

The example program WebClient does not work on the Arduino Nano Every when
DHCP is not available or commented out - the versions of Ethernet::begin()
using a static IP address fail.  I tested the example on Uno, Mega2560 and
Micro, it works on all of them using either DHCP or static IP.

This modifies the begin() method so that it uses IPAddress::raw_address()
instead of platform conditional code in the same way the DHCP version of
begin() does. With this change static addresses work on the Nano Every too.

* Release 2.0.2

* fixed no image on website issue

earlier the website didn't showed the preview on these images

* Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump geekyeggo/delete-artifact from 2 to 4 (arduino-libraries#245)

Bumps [geekyeggo/delete-artifact](https://github.com/geekyeggo/delete-artifact) from 2 to 4.
- [Release notes](https://github.com/geekyeggo/delete-artifact/releases)
- [Changelog](https://github.com/GeekyEggo/delete-artifact/blob/main/CHANGELOG.md)
- [Commits](GeekyEggo/delete-artifact@v2...v4)

---
updated-dependencies:
- dependency-name: geekyeggo/delete-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/download-artifact from 3 to 4 (arduino-libraries#244)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/upload-artifact from 3 to 4 (arduino-libraries#243)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix regression report-size-deltas after updating upload-artifact. (arduino-libraries#253)

For more information see https://github.com/arduino/report-size-deltas/blob/main/docs/FAQ.md#size-deltas-report-workflow-triggered-by-schedule-event .

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: david gauchard <gauchard@laas.fr>
Co-authored-by: per1234 <accounts@perglass.com>
Co-authored-by: taylor <taylor@wiznet.io>
Co-authored-by: Cristian Maglie <c.maglie@arduino.cc>
Co-authored-by: Juraj Andrassy <juraj.andrassy@gmail.com>
Co-authored-by: Alexander Entinger <cto@lxrobotics.com>
Co-authored-by: Guðni Már Gilbert <gudnigi@vedur.is>
Co-authored-by: Rotzbua <Rotzbua@users.noreply.github.com>
Co-authored-by: Karl Söderby <35461661+karlsoderby@users.noreply.github.com>
Co-authored-by: fredlcore <github@code-it.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacob Hylén <60390259+jacobhylen@users.noreply.github.com>
Co-authored-by: Hannes7eicher <hannes7eicher@gmail.com>
Co-authored-by: Michael Hieke <mghie@users.noreply.github.com>
Co-authored-by: Martino Facchin <m.facchin@arduino.cc>
Co-authored-by: Tanish <tanishazad03@gmail.com>
tzzee pushed a commit to tzzee/Ethernet that referenced this pull request Aug 20, 2024
…ries#153)

When `delete`ing an EthernetClient object, the compiler throws the following warning:
`warning: deleting object of polymorphic class type 'EthernetClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]`
Adding a virtual destructor solves this problem, see also here:
https://stackoverflow.com/questions/43282826/suppress-delete-non-virtual-dtor-warning-when-using-a-protected-non-virtual-dest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants