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

Warns #50

Open
wants to merge 2 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
4 changes: 3 additions & 1 deletion v0100/smlrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <assert.h>

#if UINT_MAX >= 0xFFFFFFFF
#define CAN_COMPILE_32BIT
Expand Down Expand Up @@ -1153,7 +1154,7 @@ void IncludeFile(int quot)
}
for (i = 0; i < pl; )
{
int plen = strlen(paths + i);
size_t plen = strlen(paths + i);
if (plen + 1 + nlen < MAX_FILE_NAME_LEN)
{
strcpy(FileNames[FileCnt], paths + i);
Expand Down Expand Up @@ -3930,6 +3931,7 @@ int exprval(int* idx, int* ExprTypeSynPtr, int* ConstExpr)
*ExprTypeSynPtr = -*ExprTypeSynPtr;
else
++*ExprTypeSynPtr;
assert(*ExprTypeSynPtr >= 0); // avoids gcc warning
nonVoidTypeCheck(*ExprTypeSynPtr);
if (SyntaxStack0[*ExprTypeSynPtr] == tokStructPtr && !GetDeclSize(*ExprTypeSynPtr, 0))
// incomplete structure/union type
Expand Down