public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108612] m2/gm2-libs-iso/ClientSocket.mod:229:1: error: control reaches end of non-void function [-Werror=return-type] Date: Tue, 31 Jan 2023 09:19:55 +0000 [thread overview] Message-ID: <bug-108612-4-udJsTNJnm6@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108612-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108612 --- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> --- I think the warning is correct: 196 PROCEDURE dorbytes (g: GenDevIF; d: DeviceTablePtr; 197 to: ADDRESS; 198 max: CARDINAL; 199 VAR actual: CARDINAL) : BOOLEAN ; 200 VAR 201 fd: INTEGER ; 202 c : ClientInfo ; 203 p : PtrToLoc ; 204 i : INTEGER ; 205 BEGIN 206 c := GetData(d, mid) ; 207 WITH d^ DO 208 IF max>0 209 THEN <--- HERE we miss a return value for ELSE branch 210 p := to ; 211 IF getPushBackChar(c, p^) 212 THEN 213 actual := 1 ; 214 RETURN( TRUE ) 215 END ; 216 fd := getClientSocketFd(c) ; 217 i := read(fd, p, max) ; 218 IF i>=0 219 THEN 220 actual := i ; 221 RETURN( TRUE ) 222 ELSE 223 errNum := geterrno() ; 224 actual := 0 ; 225 RETURN( FALSE ) 226 END 227 END 228 END 229 END dorbytes ;
next prev parent reply other threads:[~2023-01-31 9:19 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-31 9:17 [Bug modula2/108612] New: " marxin at gcc dot gnu.org 2023-01-31 9:19 ` marxin at gcc dot gnu.org [this message] 2023-01-31 13:14 ` [Bug modula2/108612] " gaius at gcc dot gnu.org 2023-02-01 0:57 ` gaius at gcc dot gnu.org 2023-02-01 12:33 ` gaius at gcc dot gnu.org 2023-02-01 15:03 ` marxin at gcc dot gnu.org 2023-02-01 15:53 ` gaius at gcc dot gnu.org 2023-02-01 17:26 ` cvs-commit at gcc dot gnu.org 2023-02-03 9:02 ` gaius at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-108612-4-udJsTNJnm6@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).