mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
CSS: Don't call list_empty within args of DBG.
This commit is contained in:
parent
455432fd0b
commit
ef815d5e25
@ -123,9 +123,16 @@ examine_element(struct html_context *html_context, struct css_selector *base,
|
||||
unsigned char *code;
|
||||
|
||||
#ifdef DEBUG_CSS
|
||||
/* Cannot use list_empty() inside the arglist of DBG() because
|
||||
* GCC 4.1 "warning: operation on `errfile' may be undefined"
|
||||
* breaks the build with -Werror. */
|
||||
int dbg_has_leaves, dbg_has_properties;
|
||||
|
||||
DBG("examine_element(%p, %s, %d, %d, %p, %.*s);", html_context, base->name, seltype, rel, selectors, element->namelen, element->name);
|
||||
#define dbginfo(sel, type_, base) \
|
||||
DBG("Matched selector %s (rel %d type %d [m%d])! Children %p !!%d, props !!%d", sel->name, sel->relation, sel->type, sel->type == type_, &sel->leaves, !list_empty(sel->leaves), !list_empty(sel->properties))
|
||||
dbg_has_leaves = !list_empty(sel->leaves), \
|
||||
dbg_has_properties = !list_empty(sel->properties), \
|
||||
DBG("Matched selector %s (rel %d type %d [m%d])! Children %p !!%d, props !!%d", sel->name, sel->relation, sel->type, sel->type == type_, &sel->leaves, dbg_has_leaves, dbg_has_properties)
|
||||
#else
|
||||
#define dbginfo(sel, type, base)
|
||||
#endif
|
||||
|
@ -479,11 +479,17 @@ css_parse_ruleset(struct css_stylesheet *css, struct scanner *scanner)
|
||||
/* Mirror the properties to all the selectors. */
|
||||
foreach (pkg, selectors) {
|
||||
#ifdef DEBUG_CSS
|
||||
/* Cannot use list_empty() inside the arglist of DBG()
|
||||
* because GCC 4.1 "warning: operation on `errfile'
|
||||
* may be undefined" breaks the build with -Werror. */
|
||||
int dbg_has_properties = !list_empty(properties);
|
||||
int dbg_has_leaves = !list_empty(pkg->selector->leaves);
|
||||
|
||||
DBG("Binding properties (!!%d) to selector %s (type %d, relation %d, children %d)",
|
||||
!list_empty(properties),
|
||||
dbg_has_properties,
|
||||
pkg->selector->name, pkg->selector->type,
|
||||
pkg->selector->relation,
|
||||
!list_empty(pkg->selector->leaves));
|
||||
dbg_has_leaves);
|
||||
#endif
|
||||
add_selector_properties(pkg->selector, &properties);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user