Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949835 - sys-process/atop-2.11.0: USE=module fails to build with -Werror=strict-prototypes
Summary: sys-process/atop-2.11.0: USE=module fails to build with -Werror=strict-protot...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2025-02-16 11:52 UTC by NHO
Modified: 2025-02-16 12:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,23.22 KB, text/x-log)
2025-02-16 11:52 UTC, NHO
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NHO 2025-02-16 11:52:24 UTC
Created attachment 919061 [details]
build log

netatop.c:1056:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 1056 | gctaskexit()
      |           ^
      |            void
netatop.c:1090:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 1090 | gcsockinfo()
      |           ^
      |            void
netatop.c:1303:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 1303 | gctaskinfo()
      |           ^
      |            void
netatop.c:1379:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 1379 | wipesockinfo()
      |             ^
      |              void
netatop.c:1407:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 1407 | wipetaskinfo()
      |             ^
      |              void
netatop.c:1435:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 1435 | wipetaskexit()
      |             ^
      |              void
netatop.c:1665:6: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
 1665 |            case NETATOP_GETCNT_PID:
      |            ^
netatop.c:1665:6: note: insert '__attribute__((fallthrough));' to silence this warning
 1665 |            case NETATOP_GETCNT_PID:
      |            ^
      |            __attribute__((fallthrough)); 
netatop.c:1665:6: note: insert 'break;' to avoid fall-through
 1665 |            case NETATOP_GETCNT_PID:
      |            ^
      |            break; 
netatop.c:1771:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 1771 | init_module()
      |            ^
      |             void
netatop.c:1872:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 1872 | cleanup_module()
      |               ^
      |                void
1 warning and 8 errors generated.
Comment 1 NHO 2025-02-16 11:53:40 UTC
Fix for prototypes is trivial - they are with (void), but definitions with empty braces.
Fix for fallthrough is... not.
It feels like false positive.
Comment 2 Larry the Git Cow gentoo-dev 2025-02-16 12:11:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d98d4d103b34e15df6b3ac9902a945d2336fc5c8

commit d98d4d103b34e15df6b3ac9902a945d2336fc5c8
Author:     NHOrus <jy6x2b32pie9@yahoo.com>
AuthorDate: 2025-02-16 11:58:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-16 12:04:17 +0000

    sys-process/atop: fix build for USE=modules
    
    netatop is separate source base that thankfully has right declarations
    but bad definitions. Patching definitions, but only when USE=modules
    
    Closes: https://bugs.gentoo.org/949835
    Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
    Closes: https://github.com/gentoo/gentoo/pull/40593
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-process/atop/atop-2.11.0-r1.ebuild             |  1 +
 .../files/netatop-3.2.2-strict-prototype.patch     | 77 ++++++++++++++++++++++
 2 files changed, 78 insertions(+)