Skip to content

Commit 59fa8a6

Browse files
committed
Fix some compiler warnings
1 parent 554df95 commit 59fa8a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/calibre/utils/ffmpeg.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ write_packet(void *opaque, uint8_t *buf, int buf_size) {
131131
static int64_t
132132
size_packet(PyObject *seek_func, const char *which) {
133133
PyObject *pos = NULL, *end_pos = NULL, *ret = NULL, *set = NULL;
134-
int64_t ans = AVERROR_EXTERNAL;
134+
long long ans = AVERROR_EXTERNAL;
135135
if (!(pos = PyObject_CallFunction(seek_func, "ii", 0, SEEK_CUR))) goto cleanup;
136136
if (!(end_pos = PyObject_CallFunction(seek_func, "ii", 0, SEEK_END))) goto cleanup;
137137
if (!(set = PyLong_FromLong(SEEK_SET))) goto cleanup;
138138
if (!(ret = PyObject_CallFunctionObjArgs(seek_func, pos, set, NULL))) goto cleanup;
139139
ans = PyLong_AsLongLong(end_pos);
140-
if (debug_io) printf("size %s: %ld\n", which, ans);
140+
if (debug_io) printf("size %s: %lld\n", which, ans);
141141
cleanup:
142142
Py_XDECREF(pos); Py_XDECREF(end_pos); Py_XDECREF(ret); Py_XDECREF(set);
143143
return ans;
@@ -149,7 +149,7 @@ seek_packet(PyObject *seek_func, int64_t offset, int whence, const char *which)
149149
PyObject *ret = PyObject_CallFunction(seek_func, "Li", (long long)offset, whence);
150150
if (!ret) return AVERROR_EXTERNAL;
151151
long long ans = PyLong_AsLongLong(ret);
152-
if (debug_io) printf("seek %s offset=%ld whence: %d: %lld\n", which, offset, whence, ans);
152+
if (debug_io) printf("seek %s offset=%lld whence: %d: %lld\n", which, (long long)offset, whence, ans);
153153
Py_DECREF(ret);
154154
return ans;
155155
}

0 commit comments

Comments
 (0)