diff options
Diffstat (limited to 'usr.bin/xlint/lint1/tree.c')
-rw-r--r-- | usr.bin/xlint/lint1/tree.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c index 5770f08..0d7a7fc 100644 --- a/usr.bin/xlint/lint1/tree.c +++ b/usr.bin/xlint/lint1/tree.c @@ -29,6 +29,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef lint @@ -565,7 +567,7 @@ build(op, ln, rn) rn = cconv(rn); /* - * Print some warnings for comparisions of unsigned values with + * Print some warnings for comparisons of unsigned values with * constants lower than or equal to null. This must be done * before promote() because otherwise unsigned char and unsigned * short would be promoted to int. Also types are tested to be @@ -991,7 +993,7 @@ typeok(op, arg, ln, rn) case NE: /* * Accept some things which are allowed with EQ and NE, - * but not with ordered comparisions. + * but not with ordered comparisons. */ if (lt == PTR && ((rt == PTR && rst == VOID) || isityp(rt))) { if (rn->tn_op == CON && rn->tn_val->v_quad == 0) @@ -1165,7 +1167,7 @@ ptrcmpok(op, ln, rn) /* (void *)0 already handled in typeok() */ *(lt == FUNC ? <s : &rts) = "function pointer"; *(lt == VOID ? <s : &rts) = "'void *'"; - /* ANSI C forbids comparision of %s with %s */ + /* ANSI C forbids comparison of %s with %s */ warning(274, lts, rts); } return; @@ -1396,7 +1398,7 @@ chkeop2(op, arg, ln, rn) #if 0 } else if (mp->m_comp && op != EQ && op != NE) { if (eflag) - /* dubious comparisions of enums */ + /* dubious comparisons of enums */ warning(243, mp->m_name); #endif } @@ -3675,7 +3677,7 @@ chkaidx(tn, amper) } /* - * Check for ordered comparisions of unsigned values with 0. + * Check for ordered comparisons of unsigned values with 0. */ static void chkcomp(op, ln, rn) @@ -3698,25 +3700,25 @@ chkcomp(op, ln, rn) if ((hflag || pflag) && lt == CHAR && rn->tn_op == CON && (rn->tn_val->v_quad < 0 || rn->tn_val->v_quad > ~(~0 << (CHAR_BIT - 1)))) { - /* nonportable character comparision, op %s */ + /* nonportable character comparison, op %s */ warning(230, mp->m_name); return; } if ((hflag || pflag) && rt == CHAR && ln->tn_op == CON && (ln->tn_val->v_quad < 0 || ln->tn_val->v_quad > ~(~0 << (CHAR_BIT - 1)))) { - /* nonportable character comparision, op %s */ + /* nonportable character comparison, op %s */ warning(230, mp->m_name); return; } if (isutyp(lt) && !isutyp(rt) && rn->tn_op == CON && rn->tn_val->v_quad <= 0) { if (rn->tn_val->v_quad < 0) { - /* comparision of %s with %s, op %s */ + /* comparison of %s with %s, op %s */ warning(162, tyname(ln->tn_type), "negative constant", mp->m_name); } else if (op == LT || op == GE || (hflag && op == LE)) { - /* comparision of %s with %s, op %s */ + /* comparison of %s with %s, op %s */ warning(162, tyname(ln->tn_type), "0", mp->m_name); } return; @@ -3724,11 +3726,11 @@ chkcomp(op, ln, rn) if (isutyp(rt) && !isutyp(lt) && ln->tn_op == CON && ln->tn_val->v_quad <= 0) { if (ln->tn_val->v_quad < 0) { - /* comparision of %s with %s, op %s */ + /* comparison of %s with %s, op %s */ warning(162, "negative constant", tyname(rn->tn_type), mp->m_name); } else if (op == GT || op == LE || (hflag && op == GE)) { - /* comparision of %s with %s, op %s */ + /* comparison of %s with %s, op %s */ warning(162, "0", tyname(rn->tn_type), mp->m_name); } return; |