gbranden pushed a commit to branch master
in repository groff.
commit 592efe54869d3cc8adc14af2d27edf573141beec
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Jan 12 12:45:21 2021 +1100
src/libs/libgroff/relocate.cpp: Move #ifdef again.
* src/libs/libgroff/relocate.cpp (set_current_prefix) [WIN32]: Move
declaration of `pathextstr` to lie within preprocessor conditional,
since it is dereferenced only there.
---
ChangeLog | 6 ++++++
src/libs/libgroff/relocate.cpp | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 493909e..59abb27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-12 G. Branden Robinson <[email protected]>
+
+ * src/libs/libgroff/relocate.cpp (set_current_prefix) [WIN32]:
+ Move declaration of `pathextstr` to lie within preprocessor
+ conditional, since it is dereferenced only there.
+
2021-01-10 G. Branden Robinson <[email protected]>
Add support for strsignal().
diff --git a/src/libs/libgroff/relocate.cpp b/src/libs/libgroff/relocate.cpp
index 6625e25..f18ad32 100644
--- a/src/libs/libgroff/relocate.cpp
+++ b/src/libs/libgroff/relocate.cpp
@@ -159,11 +159,11 @@ char *msw2posixpath(char *path)
// Compute the current prefix.
void set_current_prefix()
{
- char *pathextstr;
// Obtain the full path of the current binary;
// using GetModuleFileName on MS-Windows,
// and searching along PATH on other systems.
#ifdef _WIN32
+ char *pathextstr;
curr_prefix = new char[path_name_max()];
int len = GetModuleFileName(0, curr_prefix, path_name_max());
if (len)
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit