On Mon, 3 Jun 2002, Henrik Stuart wrote: >On Monday, June 03, 2002 1:15:01 AM George Greer wrote: > >> On Mon, 3 Jun 2002, Henrik Stuart wrote: >> >>> act.informative.c: >>> ------------------ >>> 205: condition always true: >>> inspect the struct.. byte is a typedef for unsigned char. I.e., > >> It's only unsigned if your 'char' is unsigned. > >Euh? Considering, at least for Visual C++'s sake, that char is signed >per default I don't see how that's connected. Now, byte is unsigned >per default. Perhaps using sbyte would prove more beneficial for >portability then. :o) structs.h: #if !defined(CIRCLE_WINDOWS) || defined(LCC_WIN32) /* Hm, sysdep.h? */ typedef char byte; #endif char === byte, so if 'char' is signed, so is 'byte. And 'char' is generally signed. GCC uses '-funsigned-char' if you want it changed. >>> db.c: >>> ----- >>> 654: function specifies a return value but terminates with an exit >>> statement. the function still requires a return since it's >>> specified, hence W8070: "Function should return a value in function >>> count_alias_records" > >> Since the function never returns (on 'exit'), I don't see much point in >> wanting a return value. The GNU C Library says: > >> extern void exit (int __status) __THROW __attribute__ ((__noreturn__)); > >> where the '__noreturn__' avoids that. > >There are other ways than the GNU way. :o) Unfortunately I do not own >the C specification so I can't tell whether that is the way it's >supposed to be done (tm). (Not that gcc even warns about missing >returns unless you use -Wall). There isn't a standard way to specify it. -- George Greer greerga@circlemud.org -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT