Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTBFS with gcc-14 #645

Closed
umlaeute opened this issue Jul 27, 2024 · 5 comments
Closed

FTBFS with gcc-14 #645

umlaeute opened this issue Jul 27, 2024 · 5 comments

Comments

@umlaeute
Copy link
Contributor

see https://bugs.debian.org/1075369

@porres
Copy link
Owner

porres commented Aug 1, 2024

hopefully fixed by 22f40da

please confirm

@porres
Copy link
Owner

porres commented Aug 1, 2024

I think this also fixes 694caf4 please confirm

@umlaeute
Copy link
Contributor Author

  1. the problems with bitand/bitor/bitxor are fixed
  2. the problem with cybuf has not been fixed (or rather: fixed wrongly). the correct fix would be to use t_word** vectors (also note the cast in the getbytes cast)

@porres porres closed this as completed in 651343f Aug 16, 2024
porres added a commit that referenced this issue Aug 16, 2024
hopefully fix #645 for good

Update cybuf.c
@porres
Copy link
Owner

porres commented Aug 16, 2024

please confirm that 2b2464a actually solves this

@umlaeute
Copy link
Contributor Author

i can confirm that the build now succeeds.

you probably should still remove the cast in

c->c_vectors = (t_word**)vectors;

diff --git a/shared/signal/cybuf.c b/shared/signal/cybuf.c
index e5769d8b..0d993e17 100644
--- a/shared/signal/cybuf.c
+++ b/shared/signal/cybuf.c
@@ -287,7 +287,7 @@ void *cybuf_init(t_class *owner, t_symbol *bufname, int numchans, int singlemode
     c->c_single = singlemode;
     c->c_owner = owner;
     c->c_npts = 0;
-    c->c_vectors = (t_word**)vectors;
+    c->c_vectors = vectors;
     c->c_channames = channames;
     c->c_disabled = 0;
     c->c_playable = 0;

a pointer cast will of course shut up any compiler-warnings, but it is also a good way to shoot yourself in the knee (as the compiler is actually warning you of some inconsistencies).
in general it is better to fix the code that triggers a warning that just silence the warning.

(as of 2b2464a, the type of vectors is t_word**, so everything is good. but if you ever change the type of vectors again (for whatever reasons), the cast in line 290 would prevent a warnings, which is bad)

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

No branches or pull requests

2 participants