On Wed, Jun 24, 2009 at 12:20:11PM -0400, Jorge Arellano Cid wrote:
On Wed, Jun 24, 2009 at 11:03:26AM +0200, Michal Nowak wrote:
gcc-4.4.0-4.i586
HG tip:
newman src $ make | grep -i warning [...] paths.cc: In static member function ???static void Paths::init()???: paths.cc:38: warning: ignoring return value of ???int chdir(const char*)???, declared with attribute warn_unused_result
With the patch dillo-guard-chdir.patch no warning. But this patch alone won't have any effect, all MSG(...) from Paths::init() won't write anything to output due to prefs.show_msg not being set to TRUE at that moment. Patch dillo-use-MSG-asap.patch moves a_Prefs_init() before Paths::init() is called. Hope it's not breaking anything.
Tested - setting non-existing directory instead of /tmp - Dillo won't crash on start, basic browsing works
Committed.
There're also:
cookies.c:90: warning: ignoring return value of 'write', cookies.c:249: warning: ignoring return value of 'fgets', dpid.c:754: warning: ignoring return value of 'write' bookmarks.c:696: warning: ignoring return value of 'system' bookmarks.c:698: warning: ignoring return value of 'system' cookies.c:188: warning: ignoring return value of 'write' cookies.c:276: warning: ignoring return value of 'fgets' cookies.c:341: warning: ignoring return value of 'fgets' cookies.c:428: warning: ignoring return value of 'ftruncate' cookies.c:1234: warning: ignoring return value of 'fgets' datauri.c:283: warning: ignoring return value of 'chdir' ftp.c:280: warning: ignoring return value of 'chdir'
Can you please make a patch for those too?
Attaching the patch. But few comments first. cookies.c: + rc = fgets(line, LINE_MAXLEN, stream); + if (!rc) { + MSG("Cookies: Error while reading rule from cookiesrc\n"); + /* (Partially) corrupted file? Skip this unreadable line */ + continue; + } The idea was to read all the lines with rules and skip those unreadable, so we have the rules before and after the unreadable part. But - can something like this happen? And will it in reality perform like I expect in the code? Another quirk I found is that I always receive one this line at Dillo start: Cookies: Error while reading rule from cookiesrc I guess there's some problem with EOF handling.
-- Cheers Jorge.-
Michal
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
-- Regards, Michal Nowak