Skip to content

Commit

Permalink
fix some uninitialized variable warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://nocs.stanford.edu/cgi-bin/svn.cgi/booksim2.0/trunk@5516 ce7aba0d-9f81-40a6-a495-cecae84b0515
  • Loading branch information
razzfazz committed Oct 6, 2013
1 parent 9014da4 commit eb346e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/flitchannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// ----------------------------------------------------------------------
FlitChannel::FlitChannel(Module * parent, string const & name, int classes)
: Channel<Flit>(parent, name), _routerSource(NULL), _routerSourcePort(-1),
_routerSink(NULL), _routerSinkPort(-1), _idle(0), _classes(classes) {
_routerSink(NULL), _routerSinkPort(-1), _idle(0) {
_active.resize(classes, 0);
}

Expand Down
1 change: 0 additions & 1 deletion src/flitchannel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class FlitChannel : public Channel<Flit> {
// Statistics for Activity Factors
vector<int> _active;
int _idle;
int _classes;
};

#endif
2 changes: 1 addition & 1 deletion src/networks/kncube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void KNCube::InsertRandomFaults( const Configuration &config )

num_fails = config.GetInt( "link_failures" );

if ( num_fails ) {
if ( _size && num_fails ) {
prev_seed = RandomIntLong( );
RandomSeed( config.GetInt( "fail_seed" ) );

Expand Down
8 changes: 4 additions & 4 deletions src/routers/chaos_router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,13 +589,13 @@ void ChaosRouter::_OutputAdvance( )

for ( int m = 0; m < _multi_queue_size; ++m ) {
if ( _multi_match[m] != -1 ) {
if ( !_multi_queue[m].empty( ) ) {
f = _multi_queue[m].front( );
_multi_queue[m].pop( );
} else {
if ( _multi_queue[m].empty( ) ) {
cout << "State = " << _multi_state[m] << endl;
Error( "Multi queue empty, but matched!" );
}
assert( !_multi_queue[m].empty( ) );
f = _multi_queue[m].front( );
_multi_queue[m].pop( );

_crossbar_pipe->Write( f, _multi_match[m] );

Expand Down

0 comments on commit eb346e6

Please sign in to comment.