~registry/kmod/master

  • Committer: Lucas De Marchi
  • Author(s): Sam James
  • Date: 2023-11-06 00:22:05 UTC
  • Revision ID: git-v1:3af2f475b0b729f20279f2ce488cc9f727f0b763
tools: depmod: fix -Walloc-size

GCC 14 introduces a new -Walloc-size included in -Wextra which gives:
```
tools/depmod.c:192:14: warning: allocation of insufficient size ‘1’ for type ‘struct index_node’ with size ‘1048’ [-Walloc-size]
tools/depmod.c:255:11: warning: allocation of insufficient size ‘1’ for type ‘struct index_value’ with size ‘16’ [-Walloc-size]
tools/depmod.c:286:35: warning: allocation of insufficient size ‘1’ for type ‘struct index_node’ with size ‘1048’ [-Walloc-size]
tools/depmod.c:315:44: warning: allocation of insufficient size ‘1’ for type ‘struct index_node’ with size ‘1048’ [-Walloc-size]
```

The calloc prototype is:
```
void *calloc(size_t nmemb, size_t size);
```

So, just swap the number of members and size arguments to match the prototype, as
we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not
doing anything wrong.

Signed-off-by: Sam James <sam@gentoo.org>
Filename Latest Rev Last Changed Committer Comment Size
..
libkmod 2 12 years ago Lucas De Marchi Rename libabc to libkmod Diff
m4 1 12 years ago Lucas De Marchi Import skeleton from libabc Diff
man 439 12 years ago Lucas De Marchi rename doc dir to man Diff
shared 919 9 years ago Lucas De Marchi Move macro.h to shared directory It's not really Diff
shell-completion 815 10 years ago Lucas De Marchi shell-completion: Add initial completion for kmod Diff
testsuite 495 12 years ago Lucas De Marchi testsuite: add skeleton Diff
tools 163 12 years ago Lucas De Marchi Merge branch 'use-mmap' Conflicts: libkmod/libkm Diff
.gitignore 1245 2 years ago Lucas De Marchi gitignore: ignore gtk-doc.make Reviewed-by: Luis 303 bytes Diff Download File
.travis.yml 1205 3 years ago Lucas De Marchi ci: update travis distro Don't bother with gcc 4. 802 bytes Diff Download File
File autogen.sh 1279 1 year ago Lucas De Marchi autogen.sh: remove --with-rootprefix, it is gone s 1.7 KB Diff Download File
CODING-STYLE 971 9 years ago Lucas De Marchi CODING-STYLE: add include order 2.3 KB Diff Download File
configure.ac 1311 5 months ago Lucas De Marchi kmod: Add pkgconfig file with kmod compile time co 11.8 KB Diff Download File
COPYING 928 9 years ago Lucas De Marchi Clarify what licences apply where This doesn't ch 25.8 KB Diff Download File
Makefile.am 1311 5 months ago Lucas De Marchi kmod: Add pkgconfig file with kmod compile time co 16.3 KB Diff Download File
NEWS 1307 6 months ago Lucas De Marchi kmod 31 30.2 KB Diff Download File
README.md 1271 1 year ago Lucas De Marchi README: Update optional dependencies Signed-off-b 3.7 KB Diff Download File
TODO 1142 6 years ago Lucas De Marchi libkmod-module: check for NULL before accessing po 2.1 KB Diff Download File