more warnings go to /dev/null

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2831 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2001-10-01 15:31:59 +00:00
parent 0a1b163e7f
commit e266fd847f
15 changed files with 45 additions and 19 deletions

View File

@ -79,7 +79,7 @@ bool BufferView::insertLyXFile(string const & filen)
return false;
}
char const c = ifs.peek();
int const c = ifs.peek();
LyXLex lex(0, 0);
lex.setStream(ifs);

View File

@ -806,6 +806,9 @@ void BufferView::Pimpl::workAreaButtonRelease(int x, int y,
return;
}
#ifdef WITH_WARNINGS
#warning variable c is set but never used. What is it good for?? (JMarc)
#endif
// check whether we want to open a float
if (bv_->text) {
bool hit = false;

View File

@ -207,7 +207,7 @@ void Bullet::generateText() const
}
string const Bullet::bulletSize(short int s)
string const Bullet::bulletSize(int s)
{
// use a parameter rather than hard code `size' in here
// in case some future function may want to retrieve
@ -223,7 +223,7 @@ string const Bullet::bulletSize(short int s)
}
string const Bullet::bulletEntry(short int f, short int c)
string const Bullet::bulletEntry(int f, int c)
{
// Despite how this may at first appear the static local variables
// are only initialized once..

View File

@ -78,9 +78,9 @@ private:
///
void generateText() const;
///
static string const bulletSize(short int);
static string const bulletSize(int);
///
static string const bulletEntry(short int, short int);
static string const bulletEntry(int, int);
///
int font;

View File

@ -1,5 +1,27 @@
2001-10-01 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lyxrc.C (read):
* vspace.C (inPixels):
(lyx_advance):
* kbmap.C (bind):
* buffer.C (insertStringAsLines):
(asciiParagraph): fix types to be large enough
* lyxlex_pimpl.h: change member status from short to int
* layout.h: fix type of endlabeltype
* kbmap.C (bind):
* kbsequence.C (parse): change return type to string::size_type
* LaTeX.C (updateBibtexDependencies): comment out unneeded
variable
* Bullet.C (bulletSize):
(bulletEntry): do not use short ints as parameters
* BufferView2.C (insertLyXFile): change a char to an int.
* WorkArea.C (WorkArea): remove unneeded floats in computation
2001-10-01 Dekel Tsur <dekelts@tau.ac.il>

View File

@ -463,7 +463,7 @@ void LaTeX::updateBibtexDependencies(DepTable & dep,
// remove all ".bib" and ".bst" files.
dep.remove_files_with_extension(".bib");
dep.remove_files_with_extension(".bst");
string aux = OnlyFilename(ChangeExtension(file, ".aux"));
//string aux = OnlyFilename(ChangeExtension(file, ".aux"));
for (vector<Aux_Info>::const_iterator it = bibtex_info.begin();
it != bibtex_info.end(); ++it) {

View File

@ -1370,7 +1370,7 @@ void Buffer::insertStringAsLines(Paragraph *& par, Paragraph::size_type & pos,
++pos;
space_inserted = true;
} else {
const Paragraph::value_type nb = 8 - pos % 8;
const Paragraph::size_type nb = 8 - pos % 8;
for (Paragraph::size_type a = 0;
a < nb ; ++a) {
par->insertChar(pos, ' ', font);
@ -1747,7 +1747,7 @@ string const Buffer::asciiParagraph(Paragraph const * par,
Paragraph::depth_type depth = 0;
int ltype = 0;
Paragraph::depth_type ltype_depth = 0;
unsigned int currlinelen = 0;
string::size_type currlinelen = 0;
bool ref_printed = false;
int noparbreak = 0;

View File

@ -71,7 +71,7 @@ void kb_keymap::printKey(kb_key const & key, string & buf)
// This binds a key to an action
int kb_keymap::bind(string const & seq, int action)
string::size_type kb_keymap::bind(string const & seq, int action)
{
if (lyxerr.debugging(Debug::KBMAP)) {
lyxerr << "BIND: Sequence `"
@ -81,7 +81,7 @@ int kb_keymap::bind(string const & seq, int action)
kb_sequence k;
int const res = k.parse(seq);
string::size_type const res = k.parse(seq);
if (!res) {
defkey(&k, action);
} else

View File

@ -26,7 +26,7 @@ public:
/** Bind a key-sequence to an action.
Returns 0 on success. Otherwise, position in string where
error occured. */
int bind(string const & seq, int action);
string::size_type bind(string const & seq, int action);
///
void print(string & buf) const;

View File

@ -93,7 +93,7 @@ int kb_sequence::addkey(unsigned int key,
Prefixes are S-, C-, M- for shift, control, meta
\* ---F------------------------------------------------------------------- */
int kb_sequence::parse(string const & s)
string::size_type kb_sequence::parse(string const & s)
{
if (s.empty()) return 1;

View File

@ -50,7 +50,7 @@ public:
void reset();
///
int parse(string const & s);
string::size_type parse(string const & s);
/// Keymap to use if a new sequence is starting
kb_keymap * stdmap;

View File

@ -302,7 +302,7 @@ public:
char labeltype; // add approp. type
///
char endlabeltype;
LYX_END_LABEL_TYPES endlabeltype;
///
LYX_MARGIN_TYPE margintype;

View File

@ -64,7 +64,7 @@ struct LyXLex::Pimpl : boost::noncopyable {
///
char buff[LEX_MAX_BUFF];
///
short status;
int status;
///
int lineno;
///

View File

@ -714,7 +714,8 @@ int LyXRC::read(string const & filename)
readBindFileIfNeeded();
// !!!chb, dynamic key binding...
int action, res = 0;
int action = 0;
string::size_type res = 0;
string seq, cmd;
if (lexrc.next()) {

View File

@ -52,7 +52,7 @@ int unit_index;
inline
void lyx_advance(string & data, unsigned int n)
void lyx_advance(string & data, string::size_type n)
{
data.erase(0, n);
}
@ -467,7 +467,7 @@ VSpace::VSpace (string const & data)
float value;
string input = strip(data);
int length = input.length();
string::size_type const length = input.length();
if (length > 1 && input[length-1] == '*') {
kp = true;
@ -597,7 +597,7 @@ int VSpace::inPixels(int default_height, int default_skip, int default_width) co
// can't display negative anyway
result = 0.0;
value = len.value();
short val_sign = value < 0.0 ? -1 : 1;
int val_sign = value < 0.0 ? -1 : 1;
switch (len.unit()) {
case LyXLength::SP: