diff --git a/mr/mr1100.cpp b/mr/mr1100.cpp index c88c9e769..b16e000a6 100755 --- a/mr/mr1100.cpp +++ b/mr/mr1100.cpp @@ -895,8 +895,9 @@ void TMRP_repgen::set_buckets() { const short first_id = 4; // Bucket 1 const short last_id = 14; // Bucket 11 + short id; - for (short id = first_id+last_bucket; id <= last_id; id++) + for (id = first_id+last_bucket; id <= last_id; id++) _form->find_field('B',odd_page,id).disable(); // Nella stampa scheduling linee, non esiste un totale per linea/impianto ma per articolo/liv giacenza @@ -957,7 +958,9 @@ void TMRP_repgen::set_buckets() _form->find_field('B', odd_page, 302).show(); _form->find_field('B', odd_page, 402).show(); _form->find_field('B', odd_page, 502).show(); - for (short id = 201; id <= 215; id++) + short id; + + for (id = 201; id <= 215; id++) _form->find_field('B', odd_page, id).hide(); // Riga totale linea for (id = 101; id <= 115; id++) _form->find_field('B', odd_page, id).hide(); // Riga totale impianto diff --git a/mr/mr2100.cpp b/mr/mr2100.cpp index 9ee7a7a99..42c5783ba 100755 --- a/mr/mr2100.cpp +++ b/mr/mr2100.cpp @@ -164,7 +164,9 @@ int TMRP_line::add_son(const real& qta, TMRP_line* son) bool TMRP_line::is_son(const TCodice_articolo& art) const { - for (int i = sons()-1; i >= 0; i--) + int i; + + for (i = sons()-1; i >= 0; i--) { const TMRP_line& r = son(i); if (r.articolo() == art) @@ -224,7 +226,9 @@ TMRP_record& TMRP_line::record(int i) const TMRP_record& TMRP_line::record(const TMRP_time& t) const { const int last = last_bucket(); - for (int i = 0; i <= last; i++) + int i; + + for (i = 0; i <= last; i++) { TMRP_record& rec = record(i); const int cmp = rec.time().compare(t); @@ -538,7 +542,9 @@ int TRiga_ordine::compare(const TToken_string& riga, bool compare_orig_doc, int int cmp = 0; if (level>=0) { - for (int i = 2; i <= level && i <= COMPARE_ALL_CODES && cmp == 0; i++) + int i; + + for (i = 2; i <= level && i <= COMPARE_ALL_CODES && cmp == 0; i++) { get(i, str0); riga.get(i, str1); @@ -1265,8 +1271,10 @@ int TMatResMask::find_pos(const TRiga_ordine& r, int& cmp, int level) const TSheet_field& s = sfield(F_ORDINI); TString_array& a = s.rows_array(); const bool cmp_orig = get_bool(F_SINGLE_DOC); - cmp = +1; - for (int i = 0; i < a.items(); i++) + int i; + + cmp = +1; // vacca + for (i = 0; i < a.items(); i++) { const TRiga_ordine& riga = (const TRiga_ordine&)a[i]; cmp = r.compare(riga, cmp_orig, level); diff --git a/mr/mr2100.h b/mr/mr2100.h index 4f2df0130..f5478d3bc 100755 --- a/mr/mr2100.h +++ b/mr/mr2100.h @@ -83,8 +83,8 @@ public : class TExceptions_array : public TAssoc_array { public : - add(TException * e); - add(const TException & e); + bool add(TException * e); + bool add(const TException & e); TExceptions_array() {} virtual ~TExceptions_array() {} }; diff --git a/mr/mr2200.cpp b/mr/mr2200.cpp index e9dd4f5d7..b5ec24224 100755 --- a/mr/mr2200.cpp +++ b/mr/mr2200.cpp @@ -851,7 +851,9 @@ int TPlanning_mask::find_constr_row(TMSP_constraint& cons) { TSheet_field& sf = sfield(F_ARTICOLI); const int maxart=sf.items(); - for (int r=0; r 1; c--) + int c; + + for (c = r; c > 1; c--) { if (sf.cell_disabled(c, b1)) break; @@ -2495,8 +2499,9 @@ bool TPlanning_mask::test_load_row(int r, bool signal) // Calcola l'indice c della riga con la capacita' const int b0 = sf.cid2index(F_LBUCKET0); const int b1 = sf.cid2index(F_LBUCKET1); + int c; - for (int c = r; c > 0; c--) + for (c = r; c > 0; c--) { if (sf.cell_disabled(c, b1)) break; diff --git a/mr/mr2202.cpp b/mr/mr2202.cpp index beaa65850..55f2e58e5 100755 --- a/mr/mr2202.cpp +++ b/mr/mr2202.cpp @@ -297,12 +297,12 @@ TException::TException(const TMRP_line * line, int from, int to, const real & q) {} -TExceptions_array::add(const TException & e) + bool TExceptions_array::add(const TException & e) { return add((TException *)e.dup()); } -TExceptions_array::add(TException * e) +bool TExceptions_array::add(TException * e) { const TMRP_line & line = e->mrpline(); TToken_string key; diff --git a/ve/ve4100.cpp b/ve/ve4100.cpp index 8916d4055..d7fa13bba 100755 --- a/ve/ve4100.cpp +++ b/ve/ve4100.cpp @@ -178,6 +178,7 @@ int TTable_expression::name2index(const char* name) const TString code(name); code.upper(); int index; + for (index = _expr.items()-1; index >= 0; index--) { const THash_object& h = (const THash_object&)_expr[index]; @@ -383,6 +384,7 @@ bool TRicalcolo_mask::gestione_um(char tipo) const { const char* const lco = "LCO"; int i; + for (i = 0; i < 3 && toupper(tipo) != lco[i]; i++); CHECK(i < 3, "Gestione unita' di misura errata"); TConfig ve(CONFIG_DITTA, "ve");