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

initialize timespec variable #1389

Merged
merged 1 commit into from
May 7, 2024
Merged

initialize timespec variable #1389

merged 1 commit into from
May 7, 2024

Conversation

kraj
Copy link
Contributor

@kraj kraj commented May 6, 2024

Fixes build warnings with GCC14

/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux/pcapplusplus/23.09/git/Packet++/src/RawPacket.cpp: In constructor 'pcpp::RawPacket::RawPacket(const uint8_t*, int, timeval, bool, pcpp::LinkLayerType)': /mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux/pcapplusplus/23.09/git/Packet++/src/RawPacket.cpp:23:18: error: 'nsec_time.timespec::' is used uninitialized [-Werror=uninitialized]
23 | timespec nsec_time;
| ^~~~~~~~~
cc1plus: all warnings being treated as errors

Fixes build warnings with GCC14

/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux/pcapplusplus/23.09/git/Packet++/src/RawPacket.cpp: In constructor 'pcpp::RawPacket::RawPacket(const uint8_t*, int, timeval, bool, pcpp::LinkLayerType)':
/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux/pcapplusplus/23.09/git/Packet++/src/RawPacket.cpp:23:18: error: 'nsec_time.timespec::<anonymous>' is used uninitialized [-Werror=uninitialized]
   23 |         timespec nsec_time;
      |                  ^~~~~~~~~
cc1plus: all warnings being treated as errors

Signed-off-by: Khem Raj <raj.khem@gmail.com>
@kraj kraj requested a review from seladb as a code owner May 6, 2024 19:17
Copy link
Collaborator

@tigercosmos tigercosmos left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@seladb seladb changed the base branch from master to dev May 7, 2024 07:00
@seladb seladb merged commit b8796af into seladb:dev May 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants