Skip to content

Core(fix): remove bool typedef in C23 - #430

Merged
SilverRainZ merged 1 commit into
SrainApp:masterfrom
pastalian:gcc15
Dec 3, 2024
Merged

Core(fix): remove bool typedef in C23#430
SilverRainZ merged 1 commit into
SrainApp:masterfrom
pastalian:gcc15

Conversation

@pastalian

Copy link
Copy Markdown
Contributor

In C23 (the default for GCC 15), bool is a keyword, so typedef needs to be removed.

../srain-1.8.0/src/inc/srain.h:26:18: error: two or more data types in declaration specifiers
   26 | typedef gboolean bool;
      |                  ^~~~
../srain-1.8.0/src/filter/user_filter.c:32:15: error: initialization of ‘SrnRet (*)(const SrnMessage *)’ {aka ‘int (*)(const struct _SrnMessage *)’} from incompatible pointe
r type ‘_Bool (*)(const SrnMessage *)’ {aka ‘_Bool (*)(const struct _SrnMessage *)’} [-Wincompatible-pointer-types]
   32 |     .filter = filter,
      |               ^~~~~~

Also fixes an oversight in 7f27c41.

../srain-1.8.0/src/core/app.c: In function ‘srn_application_add_server’:
../srain-1.8.0/src/core/app.c:237:15: error: too many arguments to function ‘srn_server_config_new’
  237 |     srv_cfg = srn_server_config_new(name);
      |               ^~~~~~~~~~~~~~~~~~~~~

Downstream Bug: https://bugs.gentoo.org/945702

Also fixes an oversight in 7f27c41.

@SilverRainZ SilverRainZ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you~

@SilverRainZ
SilverRainZ merged commit 5be3ba1 into SrainApp:master Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants