There are two warnings:
- strlen() is used without prototype
- argument of printf() is unsigned long, but used specifier is for int
This patch fixes them.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
FileSizeMax = (float)atoi(argv[++cnt]);
if(FileSizeMax > (MAX_INTS_ALLOW*sizeof(int)))
{
- printf("Max file size allowd is %i.\n",
+ printf("Max file size allowed is %lu.\n",
MAX_INTS_ALLOW*sizeof(int));
exit(0);
}
Split the modbus comm part of the program (that sends the ok to pwr me down
message) into another file "comm.c"
-
-
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
-
+#include <string.h>
/*
This is the routine that forms and