yanglint BUGFIX initialization of LYD_FORMAT var
diff --git a/tools/lint/cmd_data.c b/tools/lint/cmd_data.c
index f816d9a..529434b 100644
--- a/tools/lint/cmd_data.c
+++ b/tools/lint/cmd_data.c
@@ -194,7 +194,7 @@
             break;
         case 'O': { /* --operational */
             struct ly_in *in;
-            LYD_FORMAT f;
+            LYD_FORMAT f = LYD_UNKNOWN;
 
             if (operational) {
                 YLMSG_E("The operational datastore (-O) cannot be set multiple times.\n");
diff --git a/tools/lint/tests/interactive/data_operational.test b/tools/lint/tests/interactive/data_operational.test
index 3f95daf..8e4207b 100644
--- a/tools/lint/tests/interactive/data_operational.test
+++ b/tools/lint/tests/interactive/data_operational.test
@@ -21,4 +21,10 @@
     ly_cmd_err "data $ddir/modoper_leafref_notif_err.xml" "Failed to parse input data file"
 }}
 
+test data_operational_datastore_with_unknown_data {unknown data are ignored} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "load modrpc"
+    ly_cmd "data -t rpc -O $ddir/modmandatory_invalid.xml $ddir/modrpc.xml"
+}}
+
 cleanupTests
diff --git a/tools/lint/tests/non-interactive/data_operational.test b/tools/lint/tests/non-interactive/data_operational.test
index 3b7daf9..3b8d595 100644
--- a/tools/lint/tests/non-interactive/data_operational.test
+++ b/tools/lint/tests/non-interactive/data_operational.test
@@ -16,4 +16,8 @@
     ly_cmd_err "$mdir/modoper-leafref.yang $ddir/modoper_leafref_notif_err.xml" "Failed to parse input data file"
 } {}
 
+test data_operational_datastore_with_unknown_data {unknown data are ignored} {
+    ly_cmd "-t rpc -O $ddir/modmandatory_invalid.xml $mdir/modrpc.yang $ddir/modrpc.xml"
+} {}
+
 cleanupTests