dtcm: Resolve uninitialized warnings

This commit is contained in:
Peter Howkins
2021-12-22 01:26:51 +00:00
committed by Jon Trulson
parent 85684c337a
commit 2c134302c8
13 changed files with 24 additions and 19 deletions

View File

@@ -778,7 +778,7 @@ cms_insert_entry_5_svc(cms_insert_args *args, struct svc_req *svcrq)
cms_key key;
char *user;
uint access, needaccess;
Appt_4 *appt;
Appt_4 *appt = NULL;
if (debug)
fprintf(stderr, "cms_insert_entry_5_svc called\n");

View File

@@ -341,10 +341,10 @@ _DtCmsGetEntryAttrByKey(
CSA_return_code stat;
CSA_return_code stat2;
cms_entry *entry = NULL;
char *stime, *etime;
char *stime, *etime = NULL;
char sbuf[TIME_BUF_LEN], ebuf[TIME_BUF_LEN];
time_t firsttick = 0;
List_node *lnode;
List_node *lnode = NULL;
cms_get_entry_attr_res_item *res = NULL;
if (entry_r == NULL && res_r == NULL)
@@ -529,7 +529,7 @@ _EnumerateSequence(
stat == CSA_SUCCESS && tick < start2;
tick = NextTick(tick, fsttick, lnode->re, restate))
{
char *stime, *etime;
char *stime, *etime = NULL;
char sbuf[TIME_BUF_LEN], ebuf[TIME_BUF_LEN];
if (tick <= 0 || tick > lnode->lasttick)

View File

@@ -77,7 +77,7 @@ ClosestTick(
RepeatEvent *re,
RepeatEventState **res)
{
Tick closest_tick,
Tick closest_tick = 0,
real_start_time,
target_time = _target_time;

View File

@@ -61,7 +61,7 @@ LastTick(
const Tick start_time,
RepeatEvent *re)
{
Tick last_time;
Tick last_time = 0;
if (!re) return (Tick)0;

View File

@@ -77,7 +77,7 @@ NextTick(
RepeatEvent *re,
RepeatEventState *res)
{
Tick next_time;
Tick next_time = 0;
if (!re) return (Tick)0;

View File

@@ -339,6 +339,9 @@ _DtCms_closest_tick_v4(time_t target, time_t ftick, Period_4 period, int *ordina
struct tm tm1, tm2;
_Xltimeparams localtime_buf;
tm1.tm_isdst = 0;
tm2.tm_isdst = 0;
if (target <= ftick) {
*ordinal = 1;
return(ftick);

View File

@@ -89,7 +89,7 @@ PrevTick(
RepeatEvent *re,
RepeatEventState *res)
{
Tick next_time;
Tick next_time = 0;
Tick _start_time;
if (!re) return (Tick)0;