When MAX_TGROUPS is 1 (e.g. built without threads), gcc warns that the
ha_tgroup_ctx[] accesses in protocol_grab_foreign_receivers() may be out
of bounds, as it cannot know that nbtgroups < 2 makes them unreachable.
*orxs = NULL;
*ofds = NULL;
- if (!(global.tune.options & GTUNE_NO_TG_FD_SHARING) || global.nbtgroups < 2)
+ if (MAX_TGROUPS < 2 || !(global.tune.options & GTUNE_NO_TG_FD_SHARING) || global.nbtgroups < 2)
return 0;
/* first pass: count the candidates */