Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress Warnings #79

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sources/OpenMcdf/CompoundFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2394,7 +2394,7 @@ internal int ReadData(CFStream cFStream, long position, byte[] buffer, int offse

IDirectoryEntry de = cFStream.DirEntry;

count = (int)Math.Min((long)(de.Size - offset), (long)count);
count = (int)Math.Min((long)(de.Size - position), (long)count);

StreamView sView = null;

Expand Down Expand Up @@ -2587,7 +2587,9 @@ List<Sector> chain
/// </example>
public void Close()
{
#pragma warning disable CS0618 //Type or member is obsolete
this.Close(true);
#pragma warning restore CS0618 //Type or member is obsolete
}

private bool closeStream = true;
Expand Down Expand Up @@ -2822,7 +2824,9 @@ public static void ShrinkCompoundFile(Stream s)
s.SetLength(tmpMS.Length);

tmpMS.Close();
#pragma warning disable CS0618 //Type or member is obsolete
cf.Close(false);
#pragma warning restore CS0618 //Type or member is obsolete
}
}

Expand Down