Skip to content
Snippets Groups Projects
Commit 04b855c5 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix OpenBSD and NetBSD warnings.

parent eb4e039b
No related branches found
No related tags found
No related merge requests found
Pipeline #5624 failed
......@@ -617,7 +617,7 @@ void xp_randomize(void)
seed = curtime ^ BYTE_SWAP_INT(process_id);
#if defined(_WIN32) || defined(GetCurrentThreadId)
seed ^= (unsigned)GetCurrentThreadId();
seed ^= (unsigned)(uintptr_t)GetCurrentThreadId();
#endif
#if defined(HAS_DEV_URANDOM) && defined(URANDOM_DEV)
......
......@@ -843,7 +843,7 @@ char* iniSetDateTime(str_list_t* list, const char* section, const char* key
if(value==0)
SAFECOPY(str,"Never");
else if((p=ctime_r(&value,tstr))==NULL)
SAFEPRINTF(str,"0x%lx",value);
SAFEPRINTF(str,"0x%llx",(long long)value);
else if(!include_time) /* reformat into "Mon DD YYYY" */
safe_snprintf(str,sizeof(str),"%.3s %.2s %.4s" ,p+4,p+8,p+20);
else /* reformat into "Mon DD YYYY HH:MM:SS" */
......@@ -2295,7 +2295,7 @@ static time_t parseDateTime(const char* value)
if((t=xpDateTime_to_time(isoDateTimeStr_parse(value))) != INVALID_TIME)
return t;
return(strtoul(value,NULL,0));
return((time_t)strtoull(value,NULL,0));
}
time_t iniReadDateTime(FILE* fp, const char* section, const char* key, time_t deflt)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment