Skip to content

Prepare codebase for Ubuntu 24.04#690

Merged
AltraMayor merged 2 commits intov1.2.0-devfrom
ubu22
Jun 10, 2024
Merged

Prepare codebase for Ubuntu 24.04#690
AltraMayor merged 2 commits intov1.2.0-devfrom
ubu22

Conversation

@AltraMayor
Copy link
Owner

No description provided.

…per_if

The header include/gatekeeper_net.h was delaying the definition of
struct gatekeeper_if with the line:

struct gatekeeper_if *iface;

Instead of having the line:

struct gatekeeper_if;

The newer GCC available on Ubuntu 22.04 caught the issue.
Newer GCC was issuing the following warning for the call of
strncpy() in log_if_name():

/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~

The warning is not proper because the code is already handling
string trucations.

This commit disable -Wstringop-truncation for that single call of
strncpy() using #pragma.
@AltraMayor AltraMayor added this to the Version 1.2 milestone Jun 10, 2024
@AltraMayor AltraMayor changed the title Prepare code base for Ubuntu 24.04 Prepare codebase for Ubuntu 24.04 Jun 10, 2024
@AltraMayor AltraMayor merged commit b38a748 into v1.2.0-dev Jun 10, 2024
@AltraMayor AltraMayor deleted the ubu22 branch June 10, 2024 18:51
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.

1 participant