summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-03-27 17:22:13 (GMT)
committerGuido van Rossum <guido@python.org>1992-03-27 17:22:13 (GMT)
commit2762f250ebd42ed2f8b65cf9cd56bc65275c0b20 (patch)
tree180e430f293cb95fa84fe72087b9800283007064 /Modules/timemodule.c
parentd15b73353f17ca9ad43c50a6bd4cbce4dd04198e (diff)
downloadcpython-2762f250ebd42ed2f8b65cf9cd56bc65275c0b20.zip
cpython-2762f250ebd42ed2f8b65cf9cd56bc65275c0b20.tar.gz
cpython-2762f250ebd42ed2f8b65cf9cd56bc65275c0b20.tar.bz2
Initialized sigsave to shut lint up
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r--Modules/timemodule.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 78724f0..f886691 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -33,6 +33,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <signal.h>
#include <setjmp.h>
+#ifndef NO_UNISTD
+#include <unistd.h>
+#endif
+
/* What happens here is not trivial.
The BSD_TIME code needs <sys/time.h> (for struct timeval).
The rest of the code needs only time_t, except some MS-DOS
@@ -95,9 +99,10 @@ time_time(self, args)
static jmp_buf sleep_intr;
+/* ARGSUSED */
static void
sleep_catcher(sig)
- int sig;
+ int sig; /* Not used but required by interface */
{
longjmp(sleep_intr, 1);
}
@@ -108,7 +113,7 @@ time_sleep(self, args)
object *args;
{
int secs;
- SIGTYPE (*sigsave)();
+ SIGTYPE (*sigsave)() = 0; /* Initialized to shut lint up */
if (!getintarg(args, &secs))
return NULL;
if (setjmp(sleep_intr)) {
@@ -193,6 +198,8 @@ time_times(self, args)
struct tms t;
clock_t c;
object *tuple;
+ if (!getnoarg(args))
+ return NULL;
errno = 0;
c = times(&t);
if (c == (clock_t) -1) {