From ef1a13d08aab0f86ac502f1027368349aa68a12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lanie=20Benoit?= Date: Tue, 4 Sep 2018 10:08:52 +0200 Subject: [PATCH] Fix ddtest compilation with -02 optimization level --- apps/octonet/ddtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/octonet/ddtest.c b/apps/octonet/ddtest.c index b1b46c6..4de8c75 100644 --- a/apps/octonet/ddtest.c +++ b/apps/octonet/ddtest.c @@ -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;