lib&src: remove detected warnings
authorJean Privat <jean@pryen.org>
Fri, 24 Feb 2012 15:45:52 +0000 (10:45 -0500)
committerJean Privat <jean@pryen.org>
Fri, 24 Feb 2012 15:45:52 +0000 (10:45 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/standard/string_search.nit
src/parser/parser_prod.nit
src/parser/xss/nodes.xss
src/syntax/icode_generation.nit
src/syntax/mmbuilder.nit

index 30113ba..80cdabb 100644 (file)
@@ -78,7 +78,7 @@ class BM_Pattern
                while j < n - m + 1 do
                        var i = m - 1 # Cursor in the pattern
                        while i >= 0 and _motif[i] == s[i + j] do i -= 1
-                       if (i < 0) then
+                       if i < 0 then
                                return j
                        else
                                var gs = _gs[i] # Good shift
index bf53c49..8a2ef72 100644 (file)
@@ -22,7 +22,7 @@ redef class ANode
        # Replace itself with an other node in the AST
        fun replace_with(node: ANode)
        do
-               if (_parent != null) then
+               if _parent != null then
                        _parent.replace_child(self, node)
                end
        end
index a62df55..e5eb9da 100644 (file)
@@ -54,7 +54,7 @@ redef class PNode
        # Replace itself with an other node in the AST
        fun replace_with(node: PNode)
        do
-               if (_parent != null) then
+               if _parent != null then
                        _parent.replace_child(self, node)
                end
        end
index 19bf1b0..981f56d 100644 (file)
@@ -417,9 +417,7 @@ redef class AExternInitPropdef
                var sig = method.signature
                assert params.length == sig.arity + 1
                var rtype = sig.recv # sig.return_type
-               if rtype != null then
-                       v.add_assignment(new IRegister(rtype), v.expr(new INative(method, params), rtype))
-               end
+               v.add_assignment(new IRegister(rtype), v.expr(new INative(method, params), rtype))
 
                super
        end
index f622976..77eca56 100644 (file)
@@ -544,7 +544,7 @@ redef class AClassdef
                var local_class: MMSrcLocalClass
                var mod = v.mmmodule
                var local_classes = mod.src_local_classes
-               if (local_classes.has_key(name)) then
+               if local_classes.has_key(name) then
                        local_class = local_classes[name]
                        _local_class = local_class
                        if self isa AStdClassdef then