Re: Bernhard Übelacker
> Attached patch attempts to fill in return statements to silence these
> type of warnings, but they have to be double checked. With
> these patch applied the example openjade call went through without crash.

Hi Bernhard,

I uploaded your patch as -21.4, thanks!

Christoph
No differences were encountered between the control files

diff -Nru openjade-1.4devel1/debian/changelog openjade-1.4devel1/debian/changelog
--- openjade-1.4devel1/debian/changelog	2020-12-17 16:43:43.000000000 +0100
+++ openjade-1.4devel1/debian/changelog	2020-12-17 16:43:44.000000000 +0100
@@ -1,3 +1,13 @@
+openjade (1.4devel1-21.4) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Bernhard Übelacker ]
+  * Fix segfault caused by "no return statement in function returning
+    non-void" and other warnings. (Closes: #975242, #489482)
+
+ -- Christoph Berg <m...@debian.org>  Thu, 17 Dec 2020 16:25:32 +0100
+
 openjade (1.4devel1-21.3) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru openjade-1.4devel1/style/FlowObj.cxx openjade-1.4devel1/style/FlowObj.cxx
--- openjade-1.4devel1/style/FlowObj.cxx	2020-12-17 16:43:43.000000000 +0100
+++ openjade-1.4devel1/style/FlowObj.cxx	2020-12-17 16:43:44.000000000 +0100
@@ -2958,6 +2958,7 @@
       AcceptFlags af(fo.acceptFlags(context));
       if (af & afTableCell)
 	return true;
+      return false;
     }
     bool charsValid(size_t, const Location &loc, ProcessContext &context) {
       Interpreter &interp = *context.vm().interp;
diff -Nru openjade-1.4devel1/style/Interpreter.cxx openjade-1.4devel1/style/Interpreter.cxx
--- openjade-1.4devel1/style/Interpreter.cxx	2020-12-17 16:43:43.000000000 +0100
+++ openjade-1.4devel1/style/Interpreter.cxx	2020-12-17 16:43:44.000000000 +0100
@@ -2572,6 +2572,7 @@
   interp.message(InterpreterMessages::charPropertyNotIntegerOrFalse,
 		 StringMessageArg(name),
 		 ELObjMessageArg(obj, interp));
+  return true;
 }
 
 bool MaybeIntegerCharPropValues::setValue(const StringC &name,
@@ -2692,28 +2693,34 @@
 
 ELObj *PublicIdCharPropValues::value(Char, Interpreter &) const
 {
+  return NULL;
 }
 
 ELObj *PublicIdCharPropValues::defaultValue(Interpreter &) const
 {
+  return NULL;
 }
 
 bool SymbolCharPropValues::setDefault(const StringC &, const Location &,
 		  ELObj *, Interpreter &)
 {
+  return true;
 }
 
 bool SymbolCharPropValues::setValue(const StringC &, const StringC &, const Location &,
 		ELObj *,Interpreter &)
 {
+  return true;
 }
 
 ELObj *SymbolCharPropValues::value(Char, Interpreter &) const
 {
+  return NULL;
 }
 
 ELObj *SymbolCharPropValues::defaultValue(Interpreter &) const
 {
+  return NULL;
 }
 
 bool ELObjCharPropValues::setDefault(const StringC &, const Location &,
@@ -2722,6 +2729,7 @@
   ASSERT(obj);
   interp.makePermanent (obj);
   def_ = obj;
+  return true;
 }
 
 bool ELObjCharPropValues::setValue(const StringC &, const StringC &chars,
@@ -2732,6 +2740,7 @@
   interp.makePermanent (obj);
   for(size_t i = 0; i < chars.size(); ++i)
     map_.setChar(chars[i], obj);
+  return true;
 }
 
 ELObj *ELObjCharPropValues::value(Char ch, Interpreter &) const
diff -Nru openjade-1.4devel1/style/ProcessingMode.cxx openjade-1.4devel1/style/ProcessingMode.cxx
--- openjade-1.4devel1/style/ProcessingMode.cxx	2000-03-27 18:34:07.000000000 +0200
+++ openjade-1.4devel1/style/ProcessingMode.cxx	2020-12-17 16:43:44.000000000 +0100
@@ -328,7 +328,7 @@
 
 int ProcessingMode::RootRule::compareSpecificity(const Rule &rule) const
 {
-  rule.compareSpecificity2(this);
+  return rule.compareSpecificity2(this);
 }
 
 int ProcessingMode::RootRule::compareSpecificity2(const QueryRule *rule) const

Reply via email to