This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16.
View the commit online.
commit 49d9d22af8a6a6e1857fb001b340fca5bfc24616
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sat Jan 17 21:07:31 2015 +0100
Build with cast-align=strict, fix warnings
---
dox/dox.c | 14 ++++++++------
epp/cppexp.c | 6 +++---
m4/ec_warnflags.m4 | 2 +-
src/ecompmgr.c | 4 ++--
src/x.c | 10 ++++------
src/xprop.c | 8 ++++----
6 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/dox/dox.c b/dox/dox.c
index 58009234..56a829b3 100644
--- a/dox/dox.c
+++ b/dox/dox.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2007-2020 Kim Woelders
+ * Copyright (C) 2007-2023 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -70,7 +70,7 @@ FindRootWindow(Display * dpy)
Atom a, at;
int format_ret;
unsigned long bytes_after, num_ret;
- unsigned char *retval;
+ unsigned long *retval;
root_win = DefaultRootWindow(dpy);
@@ -82,17 +82,19 @@ FindRootWindow(Display * dpy)
a = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", True);
XGetWindowProperty(dpy, win1, a, 0, 1, False, XA_WINDOW, &at,
- &format_ret, &num_ret, &bytes_after, &retval);
+ &format_ret, &num_ret, &bytes_after,
+ (unsigned char **)&retval);
if (!retval)
goto done;
- win2 = *((Window *) retval);
+ win2 = retval[0];
XFree(retval);
XGetWindowProperty(dpy, win2, a, 0, 1, False, XA_WINDOW, &at,
- &format_ret, &num_ret, &bytes_after, &retval);
+ &format_ret, &num_ret, &bytes_after,
+ (unsigned char **)&retval);
if (!retval)
goto done;
- win3 = *((Window *) retval);
+ win3 = retval[0];
XFree(retval);
if (win2 != win3)
diff --git a/epp/cppexp.c b/epp/cppexp.c
index 1f47dda0..92ab10ee 100644
--- a/epp/cppexp.c
+++ b/epp/cppexp.c
@@ -1,6 +1,6 @@
/* Parse C expressions for CCCP.
* Copyright (C) 1987, 1992, 1994, 1995 Free Software Foundation.
- * Copyright (C) 2003-2011 Kim Woelders
+ * Copyright (C) 2003-2023 Kim Woelders
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -1056,8 +1056,8 @@ cpp_parse_expr(cpp_reader * pfile)
memcpy((char *)new_stack, (char *)stack, old_size);
}
stack = new_stack;
- top = (struct operation *)((char *)new_stack + old_size);
- limit = (struct operation *)((char *)new_stack + new_size);
+ top = (struct operation *)(void *)((char *)new_stack + old_size);
+ limit = (struct operation *)(void *)((char *)new_stack + new_size);
}
top->flags = flags;
top->rprio = rprio;
diff --git a/m4/ec_warnflags.m4 b/m4/ec_warnflags.m4
index b2d3a95d..a8a5e3a9 100644
--- a/m4/ec_warnflags.m4
+++ b/m4/ec_warnflags.m4
@@ -17,7 +17,7 @@ AC_DEFUN([EC_C_WARNINGS], [
enable_werror=no)
if test "x$GCC" = "xyes"; then
- CFLAGS_WARNINGS="-W -Wall -Waggregate-return -Wcast-align -Wpointer-arith -Wshadow -Wwrite-strings"
+ CFLAGS_WARNINGS="-W -Wall -Waggregate-return -Wcast-align=strict -Wpointer-arith -Wshadow -Wwrite-strings"
ifelse(ec_c_compile_cpp, no, [
CFLAGS_WARNINGS="$CFLAGS_WARNINGS -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes"
], [
diff --git a/src/ecompmgr.c b/src/ecompmgr.c
index e72792e5..f69c3a1e 100644
--- a/src/ecompmgr.c
+++ b/src/ecompmgr.c
@@ -475,8 +475,8 @@ make_gaussian_map(int r)
int x, y;
float t, g;
-#ifdef __clang_analyzer__
- c = malloc(sizeof(conv) + size * size * sizeof(float));
+#if 1 /* Avoid cast-align warnings */
+ c = (conv *) malloc(sizeof(conv) + size * size * sizeof(float));
#else
c = (conv *) EMALLOC(char, sizeof(conv) + size * size * sizeof(float));
#endif
diff --git a/src/x.c b/src/x.c
index e134a795..8095475f 100644
--- a/src/x.c
+++ b/src/x.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -163,15 +163,13 @@ Win
EXidLookup(EX_Window xwin)
{
Win win;
- XPointer xp;
if (!xid_context)
return NULL;
- xp = NULL;
- if (XFindContext(disp, xwin, xid_context, &xp) == XCNOENT)
- xp = NULL;
- win = (Win) xp;
+ win = NULL;
+ if (XFindContext(disp, xwin, xid_context, (XPointer *) & win) == XCNOENT)
+ win = NULL;
return win;
}
diff --git a/src/xprop.c b/src/xprop.c
index 313461cd..ae0eb915 100644
--- a/src/xprop.c
+++ b/src/xprop.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -133,7 +133,7 @@ static int
_ex_window_prop32_list_get(EX_Window win, EX_Atom atom,
EX_Atom type, unsigned int **val, int num)
{
- unsigned char *prop_ret;
+ unsigned long *prop_ret;
Atom type_ret;
unsigned long bytes_after, num_ret;
int format_ret;
@@ -143,7 +143,7 @@ _ex_window_prop32_list_get(EX_Window win, EX_Atom atom,
prop_ret = NULL;
if (XGetWindowProperty(_ex_disp, win, atom, 0, 0x7fffffff, False,
type, &type_ret, &format_ret, &num_ret,
- &bytes_after, &prop_ret) != Success)
+ &bytes_after, (unsigned char **)&prop_ret) != Success)
return -1;
if (type_ret != type || format_ret != 32)
@@ -172,7 +172,7 @@ _ex_window_prop32_list_get(EX_Window win, EX_Atom atom,
return 0;
}
for (i = 0; i < num; i++)
- lst[i] = ((unsigned long *)prop_ret)[i];
+ lst[i] = prop_ret[i];
}
if (prop_ret)
XFree(prop_ret);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.