Fix ddtest compilation with -02 optimization level

This commit is contained in:
Mélanie Benoit 2018-09-04 10:08:52 +02:00
parent 03ce6c980c
commit ef1a13d08a
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ int ReadFlash(int ddb, int argc, char *argv[], uint32_t Flags)
Start = strtoul(argv[0],NULL,16);
Len = strtoul(argv[1],NULL,16);
if (argc == 3) {
fd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC);
fd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
if (fd < 0) {
printf("Could not open file %s\n", argv[2]);
return -1;