fixed bugs and warnings - #3
Conversation
| } | ||
|
|
||
| bool Graph2d::findij(const gen & e0,double x_scale,double y_scale,double & i0,double & j0,GIAC_CONTEXT) const { | ||
| if (display_mode&0xc00==0 && e0.type==_CPLX && e0.subtype==3){ |
There was a problem hiding this comment.
CRITICAL BUG, this does display_mode & (0xc00 == 0), which is incorrect
|
|
||
| bool Graph2d::findij(const gen & e0,double x_scale,double y_scale,double & i0,double & j0,GIAC_CONTEXT) const { | ||
| if (display_mode&0xc00==0 && e0.type==_CPLX && e0.subtype==3){ | ||
| if ((display_mode & 0xc00) == 0 && e0.type == _CPLX && e0.subtype == 3){ |
There was a problem hiding this comment.
Fixed by adding parenthesis
| else | ||
| evals += " | "; | ||
| } | ||
| if (!evals.size()==0){ |
There was a problem hiding this comment.
This Bug also needed to be fixed
|
Nice. I will let @parisseb review, maybe some things got changed upstream in the meantime too |
|
I have committed the fix for graph2d::findij and in debug_loop, thank you, but I can't see what should really be applied in the other proposed changes. I'm very conservative because as we say in French "le mieux est l'ennemi du bien". |
I do believe that changing
fair enough, I will keep that in mind |
| (yyval) = (yyvsp[-1])==at_binary_minus?minus_inf:plus_inf; | ||
| } | ||
| else { | ||
| if ((yyvsp[-1])==at_binary_minus) |
There was a problem hiding this comment.
fixes -Wdangling-else
| if (t.cmd_row!=t.cur_row || t.cmd_col!=t.cur_col) | ||
| if (t.cmd_row!=t.cur_row || t.cmd_col!=t.cur_col) { | ||
| #ifdef HP39 | ||
| xend=os_draw_string_small(xend,sheety,COLOR_BLACK,COLOR_WHITE,printcell(t.cur_row,t.cur_col).c_str(),false); | ||
| #else | ||
| if (small) | ||
| xend=os_draw_string_small(xend,sheety,COLOR_BLACK,color_gris,printcell(t.cur_row,t.cur_col).c_str(),false); | ||
| else | ||
| xend=os_draw_string(xend,sheety,COLOR_BLACK,color_gris,printcell(t.cur_row,t.cur_col).c_str(),false); |
There was a problem hiding this comment.
also fixed -Wdangling-else here
|
I have committed the change in kdisplay.cc. I don't plan to make other changes since they do not seem to fix existing bugs. For uintptr_t, I'm not comfortable enough with integer types except char/short/int/long and long long (and unsigned variants). Portability is not really a concern, it's too hard (at least for me, because I'm not a computer scientist, my major is maths :-)) to have a full common code basis for all calculators (e.g. int with 24 bits vs 32, endianness, flash size considerations), therefore the tice branch is kept fully separate on my computer. |
(unsigned)ptrto(uintptr_t)ptr.c_str()to functionselsestatementscorrectedustl::string-->std::stringThese fixes could also be applied to other platforms