Deutsch English Français Italiano |
<v4a4if$161mj$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feed.opticnetworks.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: kalevi@kolttonen.fi (Kalevi Kolttonen) Newsgroups: comp.lang.c Subject: Re: Baby X is bor nagain Date: Tue, 11 Jun 2024 18:21:03 -0000 (UTC) Organization: A noiseless patient Spider Lines: 41 Message-ID: <v4a4if$161mj$1@dont-email.me> References: <v494f9$von8$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 11 Jun 2024 20:21:04 +0200 (CEST) Injection-Info: dont-email.me; posting-host="f2ad3dee80ef8f6abacddf361df158b2"; logging-data="1246931"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Xo8/Ie1ORwB+l2RBlkLI80Jjt989rAZc=" User-Agent: tin/2.6.3-20231224 ("Banff") (Linux/6.8.11-300.fc40.x86_64 (x86_64)) Cancel-Lock: sha1:RZALUeFXc/3sX5Ou5Jc0Zsuk9+4= Bytes: 2760 Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote: > Can friendly people plesse dowload it and see if it compiles on other > platforms? Fully up-to-date Fedora 40 with the following GCC: kalevi@lappari ~$ rpm -qi gcc|head -4 Name : gcc Version : 14.1.1 Release : 4.fc40 Architecture: x86_64 The build fails: [ 85%] Building C object CMakeFiles/babyxfs_shell.dir/babyxfs_src/shell/bbx_fs_shell.c.o /home/kalevi/tmp/babyx/babyxrc/babyxfs_src/shell/bbx_fs_shell.c: In function ‘cp’: /home/kalevi/tmp/babyx/babyxrc/babyxfs_src/shell/bbx_fs_shell.c:503:9: error: ‘return’ with no value, in function returning non-void [-Wreturn-mismatch] 503 | return; | ^~~~~~ /home/kalevi/tmp/babyx/babyxrc/babyxfs_src/shell/bbx_fs_shell.c:481:12: note: declared here 481 | static int cp(BBX_FS_SHELL *shell, int argc, char **argv) | ^~ /home/kalevi/tmp/babyx/babyxrc/babyxfs_src/shell/bbx_fs_shell.c: In function ‘bbx_fs_system’: /home/kalevi/tmp/babyx/babyxrc/babyxfs_src/shell/bbx_fs_shell.c:656:9: warning: ‘strncat’ specified bound 1024 equals destination size [-Wstringop-overflow=] 656 | strncat(line, " ", 1024); | ^~~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [CMakeFiles/babyxfs_shell.dir/build.make:160: CMakeFiles/babyxfs_shell.dir/babyxfs_src/shell/bbx_fs_shell.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:341: CMakeFiles/babyxfs_shell.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 After fixing the line 503 to be "return 0;", the build completed and produced the executables. But you should also address the -Wstringop-overflow warning. I also got a warning about tmpnam() being dangerous and a suggestion to use mkstemp() instead. br, KK