mirror of
https://codeberg.org/shufflecake/shufflecake-c.git
synced 2026-01-09 20:41:04 -05:00
fix: GCC 15 raised -Wincompatible-pointer-types
On GCC 15.1.0, the error
sysfs.c:47:56: error: initialization of 'ssize_t (*)(const struct module_attribute *, struct module_kobject *, char *)' {aka 'long int (*)(const struct module_attribute *, struct module_kobject *, char *)'} from incompatible pointer type 'ssize_t (*)(struct module_attribute *, struct module_kobject *, char *)' {aka 'long int (*)(struct module_attribute *, struct module_kobject *, char *)'} [-Wincompatible-pointer-types]
is raised. This is fixed by adding the `const` specifier.
Signed-off-by: Benjamin Voisin <benjamin.voisin@ens-rennes.fr>
This commit is contained in:
parent
4ec1b1cdb2
commit
4c8a50b7c4
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@
|
|||
*----------------------------
|
||||
*/
|
||||
|
||||
static ssize_t next_dev_id_show(struct module_attribute *mattr, struct module_kobject *mkobj, char *buf)
|
||||
static ssize_t next_dev_id_show(const struct module_attribute *mattr, struct module_kobject *mkobj, char *buf)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue