From: Arran Cudbard-Bell Date: Thu, 13 Apr 2017 13:51:44 +0000 (-0400) Subject: Too many flags to have a static type for FR_CONF_SUBSECTION_MULTI X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f459d7f2872aa4e41af1e518d0d8b0f8e2cb1c4;p=thirdparty%2Ffreeradius-server.git Too many flags to have a static type for FR_CONF_SUBSECTION_MULTI --- diff --git a/src/include/conf_file.h b/src/include/conf_file.h index 8338d5b4ea8..a22adfaeaae 100644 --- a/src/include/conf_file.h +++ b/src/include/conf_file.h @@ -217,14 +217,15 @@ _Generic((_ct), \ * Parse multiple instance of a subsection. * * @param _n name of subsection to search for. + * @param _t Must be PW_TYPE_SUBSECTION | PW_TYPE_MULTI and any optional flags. * @param _s instance data struct. * @param _f field in instance data struct. * @param _sub CONF_PARSER array to use to parse subsection data. */ -# define FR_CONF_SUBSECTION_MULTI(_n, _s, _f, _sub) \ +# define FR_CONF_SUBSECTION_MULTI(_n, _t, _s, _f, _sub) \ .name = _n, \ - .type = PW_TYPE_SUBSECTION | PW_TYPE_MULTI, \ - .offset = FR_CONF_TYPE_CHECK(PW_TYPE_SUBSECTION | PW_TYPE_MULTI, &(((_s *)NULL)->_f), offsetof(_s, _f)), \ + .type = (_t), \ + .offset = FR_CONF_TYPE_CHECK((_t), &(((_s *)NULL)->_f), offsetof(_s, _f)), \ .subcs = _sub, \ .subcs_size = sizeof(**(((_s *)0)->_f)) #else @@ -253,13 +254,14 @@ _Generic((_ct), \ * Parse multiple instance of a subsection. * * @param _n name of subsection to search for. + * @param _t Must be PW_TYPE_SUBSECTION | PW_TYPE_MULTI and any optional flags. * @param _s instance data struct. * @param _f field in instance data struct. * @param _sub CONF_PARSER array to use to parse subsection data. */ -# define FR_CONF_SUBSECTION_MULTI(_n, _s, _f, _sub) \ +# define FR_CONF_SUBSECTION_MULTI(_n, _t, _s, _f, _sub) \ .name = _n, \ - .type = PW_TYPE_SUBSECTION | PW_TYPE_MULTI, \ + .type = _t, \ .offset = offsetof(_s, _f), \ .subcs = _sub, \ .subcs_size = sizeof(**(((_s *)0)->_f))