# HG changeset patch # User Rik # Date 1660434348 25200 # Node ID 0a2bf14dd400245a018aa52ac588bb2abf471285 # Parent 07e3911e24c278414ebf191f995cd26186e06fc1 Add "const" qualifier to static variables that hold "fcntl.h" values. * syscalls.cc: Add "const" qualifier to static variables that hold "fcntl.h" values. diff -r 07e3911e24c2 -r 0a2bf14dd400 libinterp/corefcn/syscalls.cc --- a/libinterp/corefcn/syscalls.cc Fri Aug 12 15:57:26 2022 +0200 +++ b/libinterp/corefcn/syscalls.cc Sat Aug 13 16:45:48 2022 -0700 @@ -1436,7 +1436,7 @@ @seealso{fcntl, F_GETFD, F_GETFL, F_SETFD, F_SETFL} @end deftypefn */) { - static int val = octave_f_dupfd_wrapper (); + static const int val = octave_f_dupfd_wrapper (); if (val < 0) err_disabled_feature ("F_DUPFD", "F_DUPFD"); @@ -1452,7 +1452,7 @@ @seealso{fcntl, F_DUPFD, F_GETFL, F_SETFD, F_SETFL} @end deftypefn */) { - static int val = octave_f_getfd_wrapper (); + static const int val = octave_f_getfd_wrapper (); if (val < 0) err_disabled_feature ("F_GETFD", "F_GETFD"); @@ -1468,7 +1468,7 @@ @seealso{fcntl, F_DUPFD, F_GETFD, F_SETFD, F_SETFL} @end deftypefn */) { - static int val = octave_f_getfl_wrapper (); + static const int val = octave_f_getfl_wrapper (); if (val < 0) err_disabled_feature ("F_GETFL", "F_GETFL"); @@ -1484,7 +1484,7 @@ @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFL} @end deftypefn */) { - static int val = octave_f_setfd_wrapper (); + static const int val = octave_f_setfd_wrapper (); if (val < 0) err_disabled_feature ("F_SETFD", "F_SETFD"); @@ -1500,7 +1500,7 @@ @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFD} @end deftypefn */) { - static int val = octave_f_setfl_wrapper (); + static const int val = octave_f_setfl_wrapper (); if (val < 0) err_disabled_feature ("F_SETFL", "F_SETFL"); @@ -1520,7 +1520,7 @@ O_TRUNC, O_WRONLY} @end deftypefn */) { - static int val = octave_o_append_wrapper (); + static const int val = octave_o_append_wrapper (); if (val < 0) err_disabled_feature ("O_APPEND", "O_APPEND"); @@ -1539,7 +1539,7 @@ O_TRUNC, O_WRONLY} @end deftypefn */) { - static int val = octave_o_async_wrapper (); + static const int val = octave_o_async_wrapper (); if (val < 0) err_disabled_feature ("O_ASYNC", "O_ASYNC"); @@ -1559,7 +1559,7 @@ O_TRUNC, O_WRONLY} @end deftypefn */) { - static int val = octave_o_creat_wrapper (); + static const int val = octave_o_creat_wrapper (); if (val < 0) err_disabled_feature ("O_CREAT", "O_CREAT"); @@ -1578,7 +1578,7 @@ O_SYNC, O_TRUNC, O_WRONLY} @end deftypefn */) { - static int val = octave_o_excl_wrapper (); + static const int val = octave_o_excl_wrapper (); if (val < 0) err_disabled_feature ("O_EXCL", "O_EXCL"); @@ -1598,7 +1598,7 @@ O_TRUNC, O_WRONLY} @end deftypefn */) { - static int val = octave_o_nonblock_wrapper (); + static const int val = octave_o_nonblock_wrapper (); if (val < 0) err_disabled_feature ("O_NONBLOCK", "O_NONBLOCK"); @@ -1617,7 +1617,7 @@ O_TRUNC, O_WRONLY} @end deftypefn */) { - static int val = octave_o_rdonly_wrapper (); + static const int val = octave_o_rdonly_wrapper (); if (val < 0) err_disabled_feature ("O_RDONLY", "O_RDONLY"); @@ -1637,7 +1637,7 @@ O_SYNC, O_TRUNC, O_WRONLY} @end deftypefn */) { - static int val = octave_o_rdwr_wrapper (); + static const int val = octave_o_rdwr_wrapper (); if (val < 0) err_disabled_feature ("O_RDWR", "O_RDWR"); @@ -1656,7 +1656,7 @@ O_RDWR, O_TRUNC, O_WRONLY} @end deftypefn */) { - static int val = octave_o_sync_wrapper (); + static const int val = octave_o_sync_wrapper (); if (val < 0) err_disabled_feature ("O_SYNC", "O_SYNC"); @@ -1676,7 +1676,7 @@ O_RDWR, O_SYNC, O_WRONLY} @end deftypefn */) { - static int val = octave_o_trunc_wrapper (); + static const int val = octave_o_trunc_wrapper (); if (val < 0) err_disabled_feature ("O_TRUNC", "O_TRUNC"); @@ -1695,7 +1695,7 @@ O_RDWR, O_SYNC, O_TRUNC} @end deftypefn */) { - static int val = octave_o_wronly_wrapper (); + static const int val = octave_o_wronly_wrapper (); if (val < 0) err_disabled_feature ("O_WRONLY", "O_WRONLY");