Fossil SCM
Fix to previous for the "non-constant format" complaint from some compilers. I can't see what they're yelling about, but this fixes it.
Commit
095333fc603f655af1c65e7159113321184689fdeb41d6dc21a707272de2f112
Parent
cdb7f3b988da462…
1 file changed
+7
-3
+7
-3
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -971,13 +971,17 @@ | ||
| 971 | 971 | if( !g.perm.RdForum ){ |
| 972 | 972 | login_needed(g.anon.RdForum); |
| 973 | 973 | return; |
| 974 | 974 | } |
| 975 | 975 | style_header("Forum"); |
| 976 | - style_submenu_element("New Thread", g.perm.WrForum ? | |
| 977 | - "%R/forumnew" : | |
| 978 | - "%R/login"); | |
| 976 | + { | |
| 977 | + /* 2-step split required by some GCCs, which think this first | |
| 978 | + * expression "has non-constant format". Whatever GCC... | |
| 979 | + */ | |
| 980 | + const char* target = g.perm.WrForum ? "%R/forumnew" : "%R/login"; | |
| 981 | + style_submenu_element("New Thread", target); | |
| 982 | + } | |
| 979 | 983 | if( g.perm.ModForum && moderation_needed() ){ |
| 980 | 984 | style_submenu_element("Moderation Requests", "%R/modreq"); |
| 981 | 985 | } |
| 982 | 986 | if( (srchFlags & SRCH_FORUM)!=0 ){ |
| 983 | 987 | if( search_screen(SRCH_FORUM, 0) ){ |
| 984 | 988 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -971,13 +971,17 @@ | |
| 971 | if( !g.perm.RdForum ){ |
| 972 | login_needed(g.anon.RdForum); |
| 973 | return; |
| 974 | } |
| 975 | style_header("Forum"); |
| 976 | style_submenu_element("New Thread", g.perm.WrForum ? |
| 977 | "%R/forumnew" : |
| 978 | "%R/login"); |
| 979 | if( g.perm.ModForum && moderation_needed() ){ |
| 980 | style_submenu_element("Moderation Requests", "%R/modreq"); |
| 981 | } |
| 982 | if( (srchFlags & SRCH_FORUM)!=0 ){ |
| 983 | if( search_screen(SRCH_FORUM, 0) ){ |
| 984 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -971,13 +971,17 @@ | |
| 971 | if( !g.perm.RdForum ){ |
| 972 | login_needed(g.anon.RdForum); |
| 973 | return; |
| 974 | } |
| 975 | style_header("Forum"); |
| 976 | { |
| 977 | /* 2-step split required by some GCCs, which think this first |
| 978 | * expression "has non-constant format". Whatever GCC... |
| 979 | */ |
| 980 | const char* target = g.perm.WrForum ? "%R/forumnew" : "%R/login"; |
| 981 | style_submenu_element("New Thread", target); |
| 982 | } |
| 983 | if( g.perm.ModForum && moderation_needed() ){ |
| 984 | style_submenu_element("Moderation Requests", "%R/modreq"); |
| 985 | } |
| 986 | if( (srchFlags & SRCH_FORUM)!=0 ){ |
| 987 | if( search_screen(SRCH_FORUM, 0) ){ |
| 988 |