diff --git a/eesh/main.c b/eesh/main.c index 47b91def..553e1b21 100644 --- a/eesh/main.c +++ b/eesh/main.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2007 Kim Woelders + * Copyright (C) 2004-2020 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 @@ -256,7 +256,7 @@ Estrdup(const char *s) return NULL; sz = strlen(s); ss = EMALLOC(char, sz + 1); - strncpy(ss, s, sz + 1); + memcpy(ss, s, sz + 1); return ss; } diff --git a/src/ecompmgr.c b/src/ecompmgr.c index 72937597..c5c9858d 100644 --- a/src/ecompmgr.c +++ b/src/ecompmgr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2018 Kim Woelders + * Copyright (C) 2004-2020 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 @@ -440,10 +440,10 @@ gaussian(float r, float x, float y) } static conv * -make_gaussian_map(float r) +make_gaussian_map(int r) { conv *c; - int size = ((int)ceilf((r * 3)) + 1) & ~1; + int size = (r * 3 + 1) & ~1; int center = size / 2; int x, y; float t, g; @@ -737,8 +737,7 @@ ECompMgrWinSetExtents(EObj * eo) if (!gaussianMap) { - gaussianMap = - make_gaussian_map((float)Conf_compmgr.shadows.blur.radius); + gaussianMap = make_gaussian_map(Conf_compmgr.shadows.blur.radius); if (!gaussianMap) goto skip_shadow; } diff --git a/src/eglx.c b/src/eglx.c index 6e8c0f81..c4458296 100644 --- a/src/eglx.c +++ b/src/eglx.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2018 Kim Woelders + * Copyright (C) 2007-2020 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 @@ -353,7 +353,7 @@ EGlTextureFromImage(EImage * im, int mode) glBindTexture(et->target, et->texture); EImageGetSize(im, &w, &h); - data = EImageGetData(im); + data = (unsigned char *)EImageGetData(im); switch (mode) { diff --git a/src/glwin.c b/src/glwin.c index a696967f..826a6525 100644 --- a/src/glwin.c +++ b/src/glwin.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019 Kim Woelders + * Copyright (C) 2007-2020 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 @@ -770,6 +770,8 @@ static const CfgItem GlwinCfgItems[] = { /* * Module descriptor */ +extern const EModule ModGlwin; + const EModule ModGlwin = { "glwin", NULL, GlwinSighan, diff --git a/src/memory.c b/src/memory.c index 111adac1..1477a3fe 100644 --- a/src/memory.c +++ b/src/memory.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2005-2018 Kim Woelders + * Copyright (C) 2005-2020 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 @@ -83,7 +83,7 @@ Estrdup(const char *s) return NULL; sz = strlen(s); ss = EMALLOC(char, sz + 1); - strncpy(ss, s, sz + 1); + memcpy(ss, s, sz + 1); return ss; #endif } diff --git a/src/theme.c b/src/theme.c index 752aac76..292955f1 100644 --- a/src/theme.c +++ b/src/theme.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2019 Kim Woelders + * Copyright (C) 2004-2020 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 @@ -128,7 +128,7 @@ ThemePathName(const char *path) static void _append_merge_dir(char *dir, char ***list, int *count) { - char ss[2048], s1[FILEPATH_LEN_MAX]; + char ss[4000], s1[FILEPATH_LEN_MAX]; char **str, *s; int i, num; @@ -213,7 +213,7 @@ ThemesList(int *number) static char * _ThemeExtract(const char *path) { - char th[2048]; + char th[4000]; FILE *f; unsigned char buf[262]; size_t ret; @@ -274,7 +274,7 @@ ThemePathFind(const char *theme) static const char *const default_themes[] = { "DEFAULT", "winter", "BrushedMetal-Tigert", "ShinyMetal", NULL }; - char tpbuf[FILEPATH_LEN_MAX], *path; + char tpbuf[4000], *path; char **lst; int i, j, num; @@ -339,7 +339,7 @@ ThemePathFind(const char *theme) void ThemeFind(const char *theme) { - char name[2048]; + char name[4000]; char namx[FILEPATH_LEN_MAX]; const char *p; char *path, *s; diff --git a/src/time.c b/src/time.c index 1d0e4ff0..2d03f63b 100644 --- a/src/time.c +++ b/src/time.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2015 Kim Woelders + * Copyright (C) 2011-2020 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 @@ -22,9 +22,8 @@ */ #include "config.h" -#if USE_MONOTONIC_CLOCK #include -#else +#if !USE_MONOTONIC_CLOCK #include #endif