This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001510] Fix compiler warnings about mismatch between log()format string and argument values.
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: unassigned at bugs dot ecos dot sourceware dot org
- Date: Tue, 13 Mar 2012 14:38:29 +0000
- Subject: [Bug 1001510] Fix compiler warnings about mismatch between log()format string and argument values.
- Auto-submitted: auto-generated
- References: <bug-1001510-777@http.bugs.ecos.sourceware.org/>
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001510
--- Comment #12 from Grant Edwards <grant.b.edwards@gmail.com> 2012-03-13 14:38:25 GMT ---
(In reply to comment #11)
> Maybe sinec this is only used for debug, using diag_sprintf isn't so bad.
Something like this?
#define INTFORMAT(_t_) (sizeof(_t_) == sizeof(long long) ? "lld" : "ld")
void
microtime(struct timeval *tp)
{
*tp = ktime;
#fdef CYGPKG_NET_FREEBSD_LOGGING
if (cyg_net_log_mask & LOG_DEBUG)
{
char fmt[32];
diag_sprintf(fmt, "%%s: = %%%s.%%06%s\n", INTFORMAT(tp->tv_sec),
INTFORMAT(tp->tv_usec));
log(LOG_DEBUG, fmt, __FUNCTION__, tp->tv_sec, tp->tv_usec);
}
#endif
ktime.tv_usec++; // In case clock isn't running yet
}
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.