Skip to content

Commit

Permalink
Fixed an uninitialized variable warning, and added an assertion for
Browse files Browse the repository at this point in the history
the assumption that made it not actually be a problem.
  • Loading branch information
Matthew Hancher committed Jan 14, 2008
1 parent ef723b6 commit f5a13bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vw/FileIO/DiskImageResourceHDF.cc
Expand Up @@ -168,7 +168,8 @@ class vw::DiskImageResourceInfoHDF {

ImageFormat select_sds_planes( std::vector<DiskImageResourceHDF::SDSBand> const& sds_planes ) {
::int32 cols=0, rows=0;
ChannelTypeEnum data_type;
ChannelTypeEnum data_type = VW_CHANNEL_UNKNOWN;
VW_ASSERT(sds_planes.size()>0,ArgumentErr()<<"DiskImageResourceHDF::select_sds_planes() must be passed at least one plane!");
std::vector<PlaneInfo> new_plane_info(sds_planes.size());
// For each requested plane
for( unsigned plane=0; plane<sds_planes.size(); ++plane ) {
Expand Down

0 comments on commit f5a13bb

Please sign in to comment.