-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Building on a bit older version of (Mac) OS X we'll see a few warnings:
$ make
cc -o lc lc.c
lc.c:22:9: warning: 'DIRSIZ' macro redefined [-Wmacro-redefined]
#define DIRSIZ MAXNAMLEN
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/dir.h:86:9: note: previous definition is here
#define DIRSIZ(dp) \
^
lc.c:268:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
while (*p1++ = *p2++)
~~~~~~^~~~~~~
lc.c:268:16: note: place parentheses around the assignment to silence this warning
while (*p1++ = *p2++)
^
( )
lc.c:268:16: note: use '==' to turn this assignment into an equality comparison
while (*p1++ = *p2++)
^
==
2 warnings generated.
Both issues should be easy to fix. :)
Ignoring the warnings: the generated executable seems to work fine from what I can tell.
Metadata
Metadata
Assignees
Labels
No labels