From: SourceForge.net <no...@so...> - 2003-10-12 23:26:48
|
Bugs item #664755, was opened at 2003-01-08 15:36 Message generated for change (Settings changed) made by hobbs You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=664755&group_id=10894 Category: 36. File System Group: = 8.4.1 >Status: Closed >Resolution: Fixed Priority: 8 Submitted By: Don Porter (dgp) Assigned to: Jeffrey Hobbs (hobbs) Summary: SGI warning: tclUnixTest.c Initial Comment: cc-1183 cc: WARNING File = ./../unix/tclUnixTest.c, Line = 650 An unsigned integer is being compared to zero. if (alarm(sec) < 0) { ^ ---------------------------------------------------------------------- >Comment By: Jeffrey Hobbs (hobbs) Date: 2003-10-12 16:26 Message: Logged In: YES user_id=72656 corrected as noted by english for 8.4.5 and 8.5a0 ---------------------------------------------------------------------- Comment By: Joe English (jenglish) Date: 2003-10-11 11:38 Message: Logged In: YES user_id=68433 Full context: if (alarm(sec) < 0) { Tcl_AppendResult(interp, "alarm: ", Tcl_PosixError(interp), NULL); return TCL_ERROR; } However, according to alarm(2): unsigned int alarm(unsigned int seconds); ... RETURN VALUE alarm returns the number of seconds remaining until any previously scheduled alarm was due to be delivered, or zero if there was no previously scheduled alarm. IOW, there are no error conditions; alarm() always succeeds. (manpages on HP-UX, AIX, IRIX, and Linux all say something similar. Also, this interface goes all the way back to SVID2). It should be safe to just say: (void)alarm(sec); instead. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-01-09 07:52 Message: Logged In: YES user_id=80530 testalarm command appears to be used only in tests/unixFCmd.test which is part of the FIle System Category. ---------------------------------------------------------------------- Comment By: Vince Darley (vincentdarley) Date: 2003-01-09 02:05 Message: Logged In: YES user_id=32170 Not sure what category this belongs in, but surely not the filesystem. I frankly have no idea about this code, and on top of that it's unix-specific... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=664755&group_id=10894 |