[PR #4360] [MERGED] gcov: add missing gcov.h includes #5130

Closed
opened 2026-05-05 10:32:49 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/4360
Author: @kmk3
Created: 6/18/2021
Status: Merged
Merged: 6/19/2021
Merged by: @netblue30

Base: masterHead: gcov-add-missing-includes


📝 Commits (1)

  • 31557e9 gcov: add missing gcov.h includes

📊 Changes

14 files changed (+54 additions, -0 deletions)

View changed files

📝 src/firejail/appimage.c (+4 -0)
📝 src/firejail/chroot.c (+3 -0)
📝 src/firejail/fs.c (+4 -0)
📝 src/firejail/fs_mkdir.c (+3 -0)
📝 src/firejail/ls.c (+4 -0)
📝 src/firejail/main.c (+4 -0)
📝 src/firejail/profile.c (+5 -0)
📝 src/firejail/rlimit.c (+4 -0)
📝 src/firejail/sandbox.c (+3 -0)
📝 src/firejail/util.c (+4 -0)
📝 src/firemon/interface.c (+4 -0)
📝 src/firemon/netstats.c (+4 -0)
📝 src/firemon/procevent.c (+4 -0)
📝 src/firemon/top.c (+4 -0)

📄 Description

Fixes the following "implicit declaration" warning (13 occurrences in
total) when building with gcov support:

$ pacman -Q gcc10
gcc10 1:10.2.0-3
$ CC=gcc-10 && export CC
$ ./configure --prefix=/usr --enable-apparmor --enable-gcov >/dev/null
$ make >/dev/null
appimage.c: In function ‘appimage_set’:
appimage.c:140:2: warning: implicit declaration of function ‘__gcov_flush’ [-Wimplicit-function-declaration]
  140 |  __gcov_flush();
      |  ^~~~~~~~~~~~
interface.c: In function ‘print_sandbox’:
interface.c:149:3: warning: implicit declaration of function ‘__gcov_flush’ [-Wimplicit-function-declaration]
  149 |   __gcov_flush();
      |   ^~~~~~~~~~~~
netstats.c: In function ‘netstats’:
netstats.c:246:4: warning: implicit declaration of function ‘__gcov_flush’ [-Wimplicit-function-declaration]
  246 |    __gcov_flush();
      |    ^~~~~~~~~~~~
[...]

Note: The commands above were executed from makepkg, while building
firejail-git from the AUR.

Note2: gcc-10 was used because the build fails with the current gcc
version (11.1.0) on Artix Linux. The failure happens because
__gcov_flush was removed on gcc 11.1.0[1]; this will be addressed later.

Note3: The following command helped find the affected files:

$ git grep -Fl __gcov -- src

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=811b7636cb8c10f1a550a76242b5666c7ae36da2


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/4360 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 6/18/2021 **Status:** ✅ Merged **Merged:** 6/19/2021 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `gcov-add-missing-includes` --- ### 📝 Commits (1) - [`31557e9`](https://github.com/netblue30/firejail/commit/31557e9c770d9da7199a64f40f17f50a6686bcb1) gcov: add missing gcov.h includes ### 📊 Changes **14 files changed** (+54 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/appimage.c` (+4 -0) 📝 `src/firejail/chroot.c` (+3 -0) 📝 `src/firejail/fs.c` (+4 -0) 📝 `src/firejail/fs_mkdir.c` (+3 -0) 📝 `src/firejail/ls.c` (+4 -0) 📝 `src/firejail/main.c` (+4 -0) 📝 `src/firejail/profile.c` (+5 -0) 📝 `src/firejail/rlimit.c` (+4 -0) 📝 `src/firejail/sandbox.c` (+3 -0) 📝 `src/firejail/util.c` (+4 -0) 📝 `src/firemon/interface.c` (+4 -0) 📝 `src/firemon/netstats.c` (+4 -0) 📝 `src/firemon/procevent.c` (+4 -0) 📝 `src/firemon/top.c` (+4 -0) </details> ### 📄 Description Fixes the following "implicit declaration" warning (13 occurrences in total) when building with gcov support: $ pacman -Q gcc10 gcc10 1:10.2.0-3 $ CC=gcc-10 && export CC $ ./configure --prefix=/usr --enable-apparmor --enable-gcov >/dev/null $ make >/dev/null appimage.c: In function ‘appimage_set’: appimage.c:140:2: warning: implicit declaration of function ‘__gcov_flush’ [-Wimplicit-function-declaration] 140 | __gcov_flush(); | ^~~~~~~~~~~~ interface.c: In function ‘print_sandbox’: interface.c:149:3: warning: implicit declaration of function ‘__gcov_flush’ [-Wimplicit-function-declaration] 149 | __gcov_flush(); | ^~~~~~~~~~~~ netstats.c: In function ‘netstats’: netstats.c:246:4: warning: implicit declaration of function ‘__gcov_flush’ [-Wimplicit-function-declaration] 246 | __gcov_flush(); | ^~~~~~~~~~~~ [...] Note: The commands above were executed from makepkg, while building firejail-git from the AUR. Note2: gcc-10 was used because the build fails with the current gcc version (11.1.0) on Artix Linux. The failure happens because __gcov_flush was removed on gcc 11.1.0[1]; this will be addressed later. Note3: The following command helped find the affected files: $ git grep -Fl __gcov -- src [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=811b7636cb8c10f1a550a76242b5666c7ae36da2 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:32:49 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#5130
No description provided.