A
asdf
Dear all,
The following coding have two warnings in GCC, could you please figure
it out for me? Thank you very much !
602 : EdgePair *p1, *p2, *p3;
603 :
604 : //
605 : if (ES_sanityCheck(e1,e2))
606 : p1 = new EdgePair(e1, e2);
607 : if (ES_sanityCheck(e2,e3))
608 : p2 = new EdgePair(e2, e3);
609 : if (ES_sanityCheck(e1,e3))
610 : p3 = new EdgePair(e1, e3);
611 :
612 : //
613 : //
614 : if (p1 && p2 && p3){
615 : bool ret = ES_sanityCheck(p1, p2) &&
616 : ES_sanityCheck(p1, p3) &&
617 : ES_sanityCheck(p2, p3);
618 :
619 : delete p1, p2, p3;
620 : return ret;
621 : }
619: warning: right-hand operand of comma has no effect
619: warning: right-hand operand of comma has no effect
The following coding have two warnings in GCC, could you please figure
it out for me? Thank you very much !
602 : EdgePair *p1, *p2, *p3;
603 :
604 : //
605 : if (ES_sanityCheck(e1,e2))
606 : p1 = new EdgePair(e1, e2);
607 : if (ES_sanityCheck(e2,e3))
608 : p2 = new EdgePair(e2, e3);
609 : if (ES_sanityCheck(e1,e3))
610 : p3 = new EdgePair(e1, e3);
611 :
612 : //
613 : //
614 : if (p1 && p2 && p3){
615 : bool ret = ES_sanityCheck(p1, p2) &&
616 : ES_sanityCheck(p1, p3) &&
617 : ES_sanityCheck(p2, p3);
618 :
619 : delete p1, p2, p3;
620 : return ret;
621 : }
619: warning: right-hand operand of comma has no effect
619: warning: right-hand operand of comma has no effect