# HG changeset patch # User Rik # Date 1272041903 25200 # Node ID f5b8b28917a2a6045df6f43115c9a5d75cee41d4 # Parent ffe28cdc6fe25e9bbcfc7d0c668832b0ceb2ccc2 Eliminate compile warning about explicit braces warning: suggest explicit braces to avoid ambiguous 'else' diff -r ffe28cdc6fe2 -r f5b8b28917a2 src/ChangeLog --- a/src/ChangeLog Fri Apr 23 11:42:58 2010 +0200 +++ b/src/ChangeLog Fri Apr 23 09:58:23 2010 -0700 @@ -1,3 +1,8 @@ +2010-04-23 Rik + + * DLD-FUNCTIONS/regexp.cc.: eliminate compile warning + warning: suggest explicit braces to avoid ambiguous 'else' + 2010-04-23 Jaroslav Hajek * ov-base-scalar.h (octave_base_scalar::reshape, diff -r ffe28cdc6fe2 -r f5b8b28917a2 src/DLD-FUNCTIONS/regexp.cc --- a/src/DLD-FUNCTIONS/regexp.cc Fri Apr 23 11:42:58 2010 +0200 +++ b/src/DLD-FUNCTIONS/regexp.cc Fri Apr 23 09:58:23 2010 -0700 @@ -459,7 +459,7 @@ int pos_offset = 0; pos_match = 0; for (int i = 1; i < matches; i++) - if (ovector[2*i] >= 0 && ovector[2*i+1] > 0) + if (ovector[2*i] >= 0 && ovector[2*i+1] > 0) { if (i == 1 || ovector[2*i] != ovector[2*i-2] || ovector[2*i-1] != ovector[2*i+1]) { @@ -471,6 +471,7 @@ } else pos_offset++; + } m = std::string(*listptr); t = cell_t;