Angus Leeming wrote:
> Not too many of them...
> Angus
>
The attached patch squashes these three:
> graphicscacheitem.c(387):
> warning C4706: assignment within conditional expression
> helper_funcs.c(149):
> warning C4706: assignment within conditional expression
> lyxtextclass.c(287): warning C4706:
> assignment within conditional expression
OK to apply?
This one is interesting:
> j:\MSYS\home\Angus\LyX\devel\src\Bidi.C(141): warning C4804: '>' :
> unsafe use of type 'bool' in operation
bool const rtl_par = par.isRightToLeftPar(bufparams);
int new_level2 = new_level;
if (new_level > rtl_par)
same_direction_ = false;
I'd suggest changing the if statement to
if (new_level > 0 && !rtl_par)
OK?
--
Angus
Index: src/lyxtextclass.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxtextclass.C,v
retrieving revision 1.51
diff -u -p -r1.51 lyxtextclass.C
--- src/lyxtextclass.C 21 Oct 2005 16:11:36 -0000 1.51
+++ src/lyxtextclass.C 31 Oct 2005 12:09:38 -0000
@@ -284,7 +284,8 @@ bool LyXTextClass::Read(string const & f
lay.setName(name);
if (le == TC_ENVIRONMENT)
lay.is_environment = true;
- if (!(error = do_readStyle(lexrc, lay)))
+ error = do_readStyle(lexrc, lay);
+ if (!error)
layoutlist_.push_back(
boost::shared_ptr<LyXLayout>(new LyXLayout(lay))
);
Index: src/frontends/controllers/helper_funcs.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/helper_funcs.C,v
retrieving revision 1.41
diff -u -p -r1.41 helper_funcs.C
--- src/frontends/controllers/helper_funcs.C 16 May 2005 09:14:16 -0000 1.41
+++ src/frontends/controllers/helper_funcs.C 31 Oct 2005 12:09:38 -0000
@@ -15,6 +15,7 @@
#include "helper_funcs.h"
#include "gettext.h"
+#include "lyxlength.h"
#include "frontends/FileDialog.h"
@@ -26,9 +27,6 @@ using std::pair;
using std::vector;
using std::string;
-// sorry this is just a temporary hack we should include vspace.h! (Jug)
-extern const char * stringFromUnit(int);
-
namespace lyx {
using support::AddName;
@@ -145,9 +143,9 @@ string const browseDir(string const & pa
vector<string> const getLatexUnits()
{
vector<string> units;
- char const * str;
- for (int i = 0; (str = stringFromUnit(i)); ++i)
- units.push_back(str);
+ int i = 0;
+ for (char const * str = stringFromUnit(i); str != 0; ++i)
+ units.push_back(str);
return units;
}
Index: src/graphics/GraphicsCacheItem.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsCacheItem.C,v
retrieving revision 1.65
diff -u -p -r1.65 GraphicsCacheItem.C
--- src/graphics/GraphicsCacheItem.C 19 Jan 2005 15:03:30 -0000 1.65
+++ src/graphics/GraphicsCacheItem.C 31 Oct 2005 12:09:38 -0000
@@ -384,7 +384,8 @@ void CacheItem::Impl::convertToDisplayFo
// Make a local copy in case we unzip it
string filename;
- if ((zipped_ = zippedFile(filename_))) {
+ zipped_ = zippedFile(filename_);
+ if (zipped_) {
unzipped_filename_ = tempName(string(), filename_);
if (unzipped_filename_.empty()) {
setStatus(ErrorConverting);