summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2024-01-30 22:59:08 -0500
committerJakob Kaivo <jkk@ung.org>2024-01-30 22:59:08 -0500
commite04cf58cf3b404644b9983225ba625d656034078 (patch)
tree8238bd547c795811197f2914ca999e7903216822 /src
parent841ec551221a44355beba6593cec462347df0d12 (diff)
update to 1:1 checked functions
Diffstat (limited to 'src')
-rw-r--r--src/time/asctime.c2
-rw-r--r--src/time/asctime_s.c2
-rw-r--r--src/time/clock.c2
-rw-r--r--src/time/ctime.c2
-rw-r--r--src/time/ctime_s.c2
-rw-r--r--src/time/difftime.c2
-rw-r--r--src/time/gmtime.c2
-rw-r--r--src/time/gmtime_s.c2
-rw-r--r--src/time/localtime.c2
-rw-r--r--src/time/localtime_s.c2
-rw-r--r--src/time/mktime.c2
-rw-r--r--src/time/strftime.c2
-rw-r--r--src/time/time.c2
-rw-r--r--src/time/timespec_get.c2
14 files changed, 28 insertions, 0 deletions
diff --git a/src/time/asctime.c b/src/time/asctime.c
index 44ce130c..3ca8f5ff 100644
--- a/src/time/asctime.c
+++ b/src/time/asctime.c
@@ -24,6 +24,8 @@ char * asctime(const struct tm * timeptr)
return result;
}
+__check_1(char *, NULL, asctime, const struct tm *)
+
/***
converts the time specified at ARGUMENT(timeptr) to a string
in the format LITERAL(DDD MMM dd hh:mm:ss yyyy\n\0), where LITERAL(DDD) is the
diff --git a/src/time/asctime_s.c b/src/time/asctime_s.c
index 8a551c1f..84f20cc7 100644
--- a/src/time/asctime_s.c
+++ b/src/time/asctime_s.c
@@ -21,6 +21,8 @@ errno_t asctime_s(char *s, rsize_t maxsize, const struct tm * timeptr)
return 0;
}
+__check_3(errno_t, 0, asctime_s, char *, rsize_t, const struct tm *)
+
/***
The fn(asctime) function converts the time specified at arg(timeptr) to a string
in the format string(DDD MMM dd hh:mm:ss yyyy\n\0), where str(DDD) is the
diff --git a/src/time/clock.c b/src/time/clock.c
index 7f129e83..47fdd847 100644
--- a/src/time/clock.c
+++ b/src/time/clock.c
@@ -10,6 +10,8 @@ clock_t clock(void)
return (clock_t)-1;
}
+__check_0(clock_t, 0, clock)
+
/***
returns the amount of processor time used by the current
program. To convert this time to seconds, divide it by CONSTANT(CLOCKS_PER_SEC).
diff --git a/src/time/ctime.c b/src/time/ctime.c
index 4d0402a5..47c0fdab 100644
--- a/src/time/ctime.c
+++ b/src/time/ctime.c
@@ -14,6 +14,8 @@ char * ctime(const time_t * timer)
return asctime(localtime(timer));
}
+__check_1(char *, NULL, ctime, const time_t *)
+
/***
converts the time at ARGUMENT(timer) to a string in the same format as
FUNCTION(asctime).
diff --git a/src/time/ctime_s.c b/src/time/ctime_s.c
index aff8a533..a7a68516 100644
--- a/src/time/ctime_s.c
+++ b/src/time/ctime_s.c
@@ -10,6 +10,8 @@ errno_t ctime_s(char *s, rsize_t maxsize, const time_t *timer)
return 0;
}
+__check_3(errno_t, 0, ctime_s, char *, rsize_t, const time_t *)
+
/***
The fn(ctime) converts the time at arg(timer) to a string in the same format as
fn(asctime).
diff --git a/src/time/difftime.c b/src/time/difftime.c
index 9550306c..640b9722 100644
--- a/src/time/difftime.c
+++ b/src/time/difftime.c
@@ -9,6 +9,8 @@ double difftime(time_t time1, time_t time0)
return (double)time1 - (double)time0;
}
+__check_2(double, 0.0, difftime, time_t, time_t)
+
/***
subtracts ARGUMENT(time0) from ARGUMENT(time1).
***/
diff --git a/src/time/gmtime.c b/src/time/gmtime.c
index 3ed5081a..7ce81ba2 100644
--- a/src/time/gmtime.c
+++ b/src/time/gmtime.c
@@ -51,6 +51,8 @@ struct tm * gmtime(const time_t * timer)
return &tm;
}
+__check_1(struct tm *, 0, gmtime, const time_t *)
+
/***
converts the UTC time at ARGUMENT(timer) to a filled out STRUCTDEF(tm).
***/
diff --git a/src/time/gmtime_s.c b/src/time/gmtime_s.c
index 2eb02309..1e1bd6c1 100644
--- a/src/time/gmtime_s.c
+++ b/src/time/gmtime_s.c
@@ -11,6 +11,8 @@ struct tm * gmtime_s(const time_t * restrict timer, struct tm * restrict result)
return NULL;
}
+__check_2(struct tm *, NULL, gmtime_s, const time_t * restrict, struct tm * restrict)
+
/***
The fn(gmtime) function converts the UTC time at arg(timer) to a filled out
type(struct tm).
diff --git a/src/time/localtime.c b/src/time/localtime.c
index afcc35db..de03da7a 100644
--- a/src/time/localtime.c
+++ b/src/time/localtime.c
@@ -20,6 +20,8 @@ struct tm * localtime(const time_t * timer)
return &tm;
}
+__check_1(struct tm *, NULL, localtime, const time_t *)
+
/***
converts the locale time at ARGUMENT(timer) to a filled out STRUCTDEF(tm).
***/
diff --git a/src/time/localtime_s.c b/src/time/localtime_s.c
index c444b464..4329e883 100644
--- a/src/time/localtime_s.c
+++ b/src/time/localtime_s.c
@@ -9,6 +9,8 @@ struct tm * localtime_s(const time_t * restrict timer, struct tm * restrict resu
return NULL;
}
+__check_2(struct tm *, NULL, localtime_s, const time_t * restrict, struct tm * restrict)
+
/***
The fn(localtime) function converts the locale time at arg(timer) to a filled
out type(struct tm).
diff --git a/src/time/mktime.c b/src/time/mktime.c
index c6d5ae03..60a8cfc7 100644
--- a/src/time/mktime.c
+++ b/src/time/mktime.c
@@ -79,6 +79,8 @@ time_t mktime(struct tm * timeptr)
+ timeptr->tm_sec;
}
+__check_1(time_t, 0, mktime, struct tm *)
+
/***
converts the local time pointed to by ARGUMENT(timeptr) to
an arithmetic value of type TYPEDEF(time_t). It also normalizes the values in
diff --git a/src/time/strftime.c b/src/time/strftime.c
index 949ae79b..2ba09ecc 100644
--- a/src/time/strftime.c
+++ b/src/time/strftime.c
@@ -152,6 +152,8 @@ size_t strftime(char * restrict s, size_t maxsize, const char * restrict format,
return converted;
}
+__check_4(size_t, 0, strftime, char * restrict, size_t, const char * restrict, const struct tm *)
+
/***
converts the time at ARGUMENT(timeptr) to a string of no more than
ARGUMENT(maxsize) bytes at ARGUMENT(s). The format of the converted string
diff --git a/src/time/time.c b/src/time/time.c
index 4c4a384a..c2a1dcc8 100644
--- a/src/time/time.c
+++ b/src/time/time.c
@@ -21,6 +21,8 @@ time_t time(time_t * timer)
return (time_t)now;
}
+__check_1(time_t, 0, time, time_t *)
+
/***
gets the current time. If ARGUMENT(timer) is not CONSTANT(NULL),
the current time is also stored in the object it points to.
diff --git a/src/time/timespec_get.c b/src/time/timespec_get.c
index 3fa578b3..25f3a319 100644
--- a/src/time/timespec_get.c
+++ b/src/time/timespec_get.c
@@ -8,6 +8,8 @@ int timespec_get(struct timespec *ts, int base)
return base;
}
+__check_2(int, 0, timespec_get, struct timespec *, int)
+
/*
STDC(201112)
*/