Patch: sbmanager
Reported by rru | June 24th, 2010 @ 01:21 AM
When compiling sbmanager I stumbled across the following error:
$ make make all-recursive
make[1]: Entering directory
/var/local/downloads/iphone/sbmanager'<br/> Making all
in data<br/> make[2]: Entering
directory
/var/local/downloads/iphone/sbmanager/data'
make[2]: Nothing to be done for all'.<br/> make[2]:
Leaving
directory
/var/local/downloads/iphone/sbmanager/data'
Making all in src
make[2]: Entering directory
/var/local/downloads/iphone/sbmanager/src'<br/> CC
libsbmanager_la-device.lo cc1: warnings being treated as
errors<br/> device.c: In function
'device_sbs_save_icon':<br/> device.c:138: error: ignoring
return value of 'fwrite', declared with attribute
warn_unused_result<br/> make[2]: ***
[libsbmanager_la-device.lo] Error 1<br/> make[2]: Leaving
directory
/var/local/downloads/iphone/sbmanager/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
/var/local/downloads/iphone/sbmanager'<br/> make: ***
[all] Error 2
Here is a small patch for this problem
(see also the attached file
sbmanager_check_return_fwrite.patch)
--- src/device.c 2010/06/24 00:35:37 1.1 +++ src/device.c 2010/06/24 00:53:10 1.7 @@ -135,7 +135,9 @@
if ((sbservices_get_icon_pngdata(sbc, display_identifier, &png, &pngsize) == SBSERVICES_E_SUCCESS) && (pngsize > 0)) {
/* save png icon to disk */
FILE *f = fopen(filename, "w");
-
fwrite(png, 1, pngsize, f);
-
if (fwrite(png, 1, pngsize, f) != sizeof(pngsize)){
-
*error = g_error_new(device_domain, EIO, _("Could not save icon png to disk!"));
-
} fclose(f); res = TRUE;
Comments and changes to this ticket
-
Martin S. March 13th, 2011 @ 03:50 PM
- State changed from new to resolved
- Milestone order changed from 0 to 0
Thanks but we use GIO now to save the icons and also cache them at a generic location for reuse in other applications.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A project around supporting the iPhone in Linux.
See http://libimobiledevice.org