diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-10-28 18:02:20 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-10-28 18:02:20 +0000 |
| commit | 291faee430b13248a1b97e1ef254b9a468a67ad1 (patch) | |
| tree | ff6f7a61ff69000fe2b0c25b71d16bbc1ee2bb3a /src/Fl_Preferences.cxx | |
| parent | 58bdfbdedd56582d4ed835018494dc21dc605f40 (diff) | |
Fixed a bunch of warnings from gcc 4.4.5 . Most of these are parenthesis missing to make the precedence of && over || obvious. Ah well, why not...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Preferences.cxx')
| -rw-r--r-- | src/Fl_Preferences.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx index bc3df3d33..d8d3eaf10 100644 --- a/src/Fl_Preferences.cxx +++ b/src/Fl_Preferences.cxx @@ -162,9 +162,7 @@ const char *Fl_Preferences::newUUID() b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15]); } #else -# if defined(__GNUC__) -# warning Unix implementation of Fl_Preferences::newUUID() incomplete! -# endif /*__GNUC__*/ + // warning Unix implementation of Fl_Preferences::newUUID() incomplete! // #include <uuid/uuid.h> // void uuid_generate(uuid_t out); unsigned char b[16]; @@ -692,8 +690,13 @@ static char *decodeText( const char *src ) const char *s = src; for ( ; *s; s++, len++ ) { - if ( *s == '\\' ) - if ( isdigit( s[1] ) ) s+=3; else s+=1; + if ( *s == '\\' ) { + if ( isdigit( s[1] ) ) { + s+=3; + } else { + s+=1; + } + } } char *dst = (char*)malloc( len+1 ), *d = dst; for ( s = src; *s; s++ ) @@ -1267,9 +1270,9 @@ int Fl_Preferences::RootNode::read() if ( !f ) return -1; - fgets( buf, 1024, f ); - fgets( buf, 1024, f ); - fgets( buf, 1024, f ); + if (fgets( buf, 1024, f )==0) { /* ignore */ } + if (fgets( buf, 1024, f )==0) { /* ignore */ } + if (fgets( buf, 1024, f )==0) { /* ignore */ } Node *nd = prefs_->node; for (;;) { |
