diff options
author | Reverend Homer <mk.43.ecko@gmail.com> | 2018-11-30 08:50:28 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2018-11-30 08:53:13 +0100 |
commit | 704b3aab58d2e2dfb26ddca48f35f0271b8905a5 (patch) | |
tree | c050b0563e8d605f0f8ef3c27f9541c813194d74 | |
parent | 3b7c0c2b634762763f506f834cfaf12bb1873711 (diff) | |
download | libmtp-704b3aab58d2e2dfb26ddca48f35f0271b8905a5.tar.gz |
libmtp: fix a couple of format strings
[src/libmtp.c:3379]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src/libmtp.c:3379]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/libmtp.c:3379]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'.
[src/libmtp.c:3405]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
-rw-r--r-- | src/libmtp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libmtp.c b/src/libmtp.c index 23bb3d2..e50915c 100644 --- a/src/libmtp.c +++ b/src/libmtp.c @@ -2754,7 +2754,9 @@ static void get_handles_recursively(LIBMTP_mtpdevice_t *device, ¤tHandles); if (ret != PTP_RC_OK) { - add_ptp_error_to_errorstack(device, ret, "get_handles_recursively(): could not get object handles."); + char buf[80]; + sprintf(buf,"get_handles_recursively(): could not get object handles of %08x", parent); + add_ptp_error_to_errorstack(device, ret, buf); return; } @@ -3376,7 +3378,7 @@ void LIBMTP_Dump_Device_Info(LIBMTP_mtpdevice_t *device) printf(" UINT32 data type"); switch (opd.FormFlag) { case PTP_OPFF_Range: - printf(" range: MIN %d, MAX %d, STEP %d", + printf(" range: MIN %u, MAX %u, STEP %u", opd.FORM.Range.MinimumValue.u32, opd.FORM.Range.MaximumValue.u32, opd.FORM.Range.StepSize.u32); @@ -3402,7 +3404,7 @@ void LIBMTP_Dump_Device_Info(LIBMTP_mtpdevice_t *device) } else { printf(" enumeration: "); for(k=0;k<opd.FORM.Enum.NumberOfValues;k++) { - printf("%d, ", opd.FORM.Enum.SupportedValue[k].u32); + printf("%u, ", opd.FORM.Enum.SupportedValue[k].u32); } } break; @@ -4520,8 +4522,9 @@ LIBMTP_file_t * LIBMTP_Get_Files_And_Folders(LIBMTP_mtpdevice_t *device, ¤tHandles); if (ret != PTP_RC_OK) { - add_ptp_error_to_errorstack(device, ret, - "LIBMTP_Get_Files_And_Folders(): could not get object handles."); + char buf[80]; + sprintf(buf,"LIBMTP_Get_Files_And_Folders(): could not get object handles of %08x.", parent); + add_ptp_error_to_errorstack(device, ret, buf); return NULL; } |