Remove a few cppcheck warnings.

This patch removes a few cppcheck warnings.
This commit is contained in:
Cary R 2011-10-12 11:51:00 -07:00 committed by Stephen Williams
parent 8e3d80679d
commit 8f17e79b7e
3 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
%{
/*
* Copyright (c) 2001-2010 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2011 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -24,6 +24,7 @@
# include <stdlib.h>
# include <stdio.h>
# include <string.h>
# include "ivl_alloc.h"
/*

View File

@ -20,6 +20,7 @@
# include <string.h>
# include "config.h"
# include "vlog95_priv.h"
# include "ivl_alloc.h"
static void emit_entry(ivl_udp_t udp, char entry, unsigned *rerun)
{

View File

@ -201,8 +201,8 @@ Expression*ExpAggregate::choice_t::simple_expression(bool detach_flag)
ExpAggregate::element_t::element_t(list<choice_t*>*fields, Expression*val)
: fields_(fields? fields->size() : 0), val_(val)
{
size_t idx = 0;
if (fields) {
size_t idx = 0;
while (! fields->empty()) {
assert(idx < fields_.size());
fields_[idx++] = fields->front();