function hdfwarn(status)
%Use the last error generated by the HDF library as a warning.

%   Copyright 1984-2002 The MathWorks, Inc. 
%   $Revision: 1.3 $  $Date: 2002/06/05 20:09:11 $

if status==-1
  msg = '';
  error_code = hdfhe('value',1);
  msg = sprintf('The NCSA HDF library reported the following error: \n%s',hdfhe('string',error_code));
  warning(msg)
end
return;
