Skip to content

Commit ceda2dc

Browse files
committed
main: suppress the warning "warning: unknown conversion type character 'l' in format [-Wformat=]"
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent f3a2a30 commit ceda2dc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

main/field.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,11 +1141,16 @@ static const char *renderFieldEpoch (const tagEntryInfo *const tag,
11411141
{
11421142
#define buf_len 21
11431143
static char buf[buf_len];
1144-
1145-
if (snprintf (buf, buf_len, "%lld", (long long)tag->extensionFields.epoch) > 0)
1144+
#ifdef _MSC_VER
1145+
#define FMTLL "%I64d"
1146+
#else
1147+
#define FMTLL "%lld"
1148+
#endif
1149+
if (snprintf (buf, buf_len, FMTLL, (long long)tag->extensionFields.epoch) > 0)
11461150
return renderAsIs (b, buf);
11471151
else
11481152
return NULL;
1153+
#undef FMTLL
11491154
#undef buf_len
11501155
}
11511156

0 commit comments

Comments
 (0)