Avoid statement-not-reached warnings
[yaz-moved-to-github.git] / src / record_conv.c
index 731fa35..ff95f92 100644 (file)
@@ -195,7 +195,6 @@ static void *construct_xslt(const xmlNode *ptr,
         wrbuf_printf(wr_error, "Element <xslt>: "
                      "attribute 'stylesheet' expected");
         nmem_destroy(nmem);
-        return 0;
     }
     else
     {
@@ -241,7 +240,6 @@ static void *construct_xslt(const xmlNode *ptr,
                          ")");
             xmlFreeDoc(info->xsp_doc);
             nmem_destroy(info->nmem);
-            return 0;
         }
         else
         {
@@ -630,7 +628,10 @@ int yaz_record_conv_opac_record(yaz_record_conv_t p,
     int ret = 0;
     struct yaz_record_conv_rule *r = p->rules;
     if (!r || r->type->construct != construct_marc)
+    {
+        wrbuf_puts(p->wr_error, "Expecting MARC rule as first rule for OPAC");
         ret = -1; /* no marc rule so we can't do OPAC */
+    }
     else
     {
         struct marc_info *mi = r->info;