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

Fix warnings about allocations exceeding maximum object size #1600

Merged
merged 1 commit into from Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Xrd/XrdBuffXL.cc
Expand Up @@ -63,7 +63,8 @@ XrdBuffXL::XrdBuffXL() : bucket(0), totalo(0), pagsz(getpagesize()), slots(0),

void XrdBuffXL::Init(int maxMSZ)
{
int lg2, chunksz;
unsigned int lg2;
int chunksz;

// If this is a duplicate call, delete the previous setup
//
Expand Down
2 changes: 1 addition & 1 deletion src/XrdNet/XrdNetUtils.cc
Expand Up @@ -259,7 +259,7 @@ const char *XrdNetUtils::GetAddrs(const char *hSpec,
//
if (aInfo.aNum4 || aInfo.aNum6)
{aVsz = aInfo.aNum4 + aInfo.aNum6;
*aVec = new XrdNetAddr[aVsz];
*aVec = new XrdNetAddr[(unsigned int)aVsz];
FillAddr(aInfo, *aVec);
}

Expand Down
2 changes: 1 addition & 1 deletion src/XrdOuc/XrdOucBuffer.cc
Expand Up @@ -76,7 +76,7 @@ XrdOucBuffPool::XrdOucBuffPool(int minsz, int maxsz,

// Allocate a slot vector for this
//
bSlot = new BuffSlot[slots];
bSlot = new BuffSlot[(unsigned int)slots];

// Complete initializing the slot vector
//
Expand Down
2 changes: 1 addition & 1 deletion src/XrdOuc/XrdOucTable.hh
Expand Up @@ -40,7 +40,7 @@ public:

XrdOucTable(int maxe)
{int i;
Table = new OucTable[maxe];
Table = new OucTable[(unsigned int)maxe];
maxnum = maxe; curnum = 0; avlnum = 0;
for (i = 1; i < maxe; i++) Table[i-1].Fnum = i;
Table[maxe-1].Fnum = -1;
Expand Down
2 changes: 1 addition & 1 deletion src/XrdPosix/XrdPosixAdmin.cc
Expand Up @@ -49,7 +49,7 @@ XrdCl::URL *XrdPosixAdmin::FanOut(int &num)
XrdCl::URL *uVec;
XrdNetAddr netLoc;
const char *hName;
int i;
unsigned int i;

// Make sure admin is ok
//
Expand Down