Mercurial > mxe-octave
comparison installer-files/octave-launch.c @ 5985:1b5d45d7afd4
octave-launch: Don't use undefined behavior (bug #61208).
* installer-files/octave-launch.c (get_num_physical_cores): Incrementing a
"void *" is undefined behavior. Use "char *" instead.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Fri, 26 Nov 2021 23:14:29 +0100 |
parents | 532c6ba0156f |
children | 88762923aa9a |
comparison
equal
deleted
inserted
replaced
5984:532c6ba0156f | 5985:1b5d45d7afd4 |
---|---|
39 } | 39 } |
40 | 40 |
41 static size_t get_num_physical_cores (void) | 41 static size_t get_num_physical_cores (void) |
42 { | 42 { |
43 DWORD length; | 43 DWORD length; |
44 void *lpi; | 44 char *lpi; |
45 BOOL res; | 45 BOOL res; |
46 size_t num_physical_cores; | 46 size_t num_physical_cores; |
47 size_t offset; | 47 size_t offset; |
48 | 48 |
49 length = 0; | 49 length = 0; |