[generator] warning when unit attribute is used in firmware section

see #2252
This commit is contained in:
Gautier Hattenberger
2018-12-05 22:00:46 +01:00
parent b2667da42e
commit f7c441e3fb
+4
View File
@@ -104,6 +104,10 @@ let flag_xml2mk = fun f ?(target="$(TARGET)") xml ->
let define_xml2mk = fun f ?(target="$(TARGET)") xml ->
let name = Xml.attrib xml "name"
and value = try Some (Xml.attrib xml "value") with _ -> None in
let _ = try
ignore(Xml.attrib xml "unit");
prerr_endline ("Warning: 'unit' attribute for '"^name^"' in firmware section is not handled") with _ -> ()
in
let flag_type = fun s ->
match ExtXml.attrib_or_default xml "type" "raw", value with
| "string", Some v -> "=\\\""^v^"\\\""