You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addressing:
/home/jcerny/openscap/src/XCCDF/xccdf_session.c: In function ‘_build_xccdf_result_source’:
/home/jcerny/openscap/src/XCCDF/xccdf_session.c:1286:30: warning: passing argument 1 of ‘xccdf_benchmark_add_result’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1286 | xccdf_benchmark_add_result(benchmark, cloned_result);
| ^~~~~~~~~
In file included from /home/jcerny/openscap/src/XCCDF_POLICY/public/xccdf_policy.h:34,
from /home/jcerny/openscap/src/OVAL/public/oval_agent_xccdf_api.h:41,
from /home/jcerny/openscap/src/XCCDF/xccdf_session.c:38:
/home/jcerny/openscap/src/XCCDF/public/xccdf_benchmark.h:3141:67: note: expected ‘struct xccdf_benchmark *’ but argument is of type ‘const struct xccdf_benchmark *’
3141 | OSCAP_API bool xccdf_benchmark_add_result(struct xccdf_benchmark *bench, struct xccdf_result *result);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/jcerny/openscap/src/XCCDF/xccdf_session.c:1287:64: warning: passing argument 1 of ‘xccdf_benchmark_export_source’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1287 | session->xccdf.result_source = xccdf_benchmark_export_source(benchmark, session->export.xccdf_file);
| ^~~~~~~~~
In file included from /home/jcerny/openscap/src/XCCDF_POLICY/public/xccdf_policy.h:34,
from /home/jcerny/openscap/src/OVAL/public/oval_agent_xccdf_api.h:41,
from /home/jcerny/openscap/src/XCCDF/xccdf_session.c:38:
/home/jcerny/openscap/src/XCCDF/public/xccdf_benchmark.h:722:32: note: expected ‘struct xccdf_benchmark *’ but argument is of type ‘const struct xccdf_benchmark *’
722 | OSCAP_API struct oscap_source *xccdf_benchmark_export_source(struct xccdf_benchmark *benchmark, const char *filename);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy file name to clipboardExpand all lines: src/XCCDF/xccdf_session.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1275,7 +1275,7 @@ static int _build_xccdf_result_source(struct xccdf_session *session)
1275
1275
1276
1276
/* Build oscap_source of XCCDF TestResult only when needed */
1277
1277
if (session->export.xccdf_file!=NULL||session->export.report_file!=NULL||session->export.arf_file!=NULL||session->export.xccdf_stig_viewer_file!=NULL) {
0 commit comments