mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
tweaks to avoid compiler warnings
This commit is contained in:
parent
0b34eac9e1
commit
f18594ff3e
1 changed files with 7 additions and 5 deletions
|
@ -1133,7 +1133,7 @@ failure:
|
||||||
{
|
{
|
||||||
searchRange.length = countOther;
|
searchRange.length = countOther;
|
||||||
}
|
}
|
||||||
if (memcmp(&bytesSelf[searchRange.location], &bytesOther[0],
|
if (memcmp(bytesSelf + searchRange.location, bytesOther,
|
||||||
countOther) == 0)
|
countOther) == 0)
|
||||||
{
|
{
|
||||||
result = searchRange;
|
result = searchRange;
|
||||||
|
@ -1165,7 +1165,8 @@ failure:
|
||||||
{
|
{
|
||||||
while (pos-- > 0)
|
while (pos-- > 0)
|
||||||
{
|
{
|
||||||
if (memcmp(&bytesSelf[searchRange.location + pos], bytesOther, countOther) == 0)
|
if (memcmp(bytesSelf + searchRange.location + pos,
|
||||||
|
bytesOther, countOther) == 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1175,7 +1176,8 @@ failure:
|
||||||
{
|
{
|
||||||
while (pos < end)
|
while (pos < end)
|
||||||
{
|
{
|
||||||
if (memcmp(&bytesSelf[searchRange.location + pos], bytesOther, countOther) == 0)
|
if (memcmp(bytesSelf + searchRange.location + pos,
|
||||||
|
bytesOther, countOther) == 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1981,8 +1983,8 @@ failure:
|
||||||
int desc;
|
int desc;
|
||||||
int mask;
|
int mask;
|
||||||
|
|
||||||
strncpy(thePath, theRealPath, sizeof(thePath) - 1);
|
strncpy(thePath, theRealPath, sizeof(thePath) - 7);
|
||||||
thePath[sizeof(thePath) - 1] = '\0';
|
thePath[sizeof(thePath) - 7] = '\0';
|
||||||
strncat(thePath, "XXXXXX", 6);
|
strncat(thePath, "XXXXXX", 6);
|
||||||
if ((desc = mkstemp(thePath)) < 0)
|
if ((desc = mkstemp(thePath)) < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue