commit - af60b04af6a7bd8e5e18a7bc271f75af476ccccb
commit + 9f68765ee52324f2ec07f7866b5b66b572b72995
blob - 0273ba4bad194dae94c9512b7712a776539e222e
blob + 9c9e0f793a83d1e3dba565cc6a1747ba982d24c7
--- Makefile
+++ Makefile
HDR_DWM = dwm/drw.h dwm/util.h dwm/config.h master.h
SRC_ST = st/st.c st/x.c
-HDR_ST = st/arg.h st/st.h st/win.h st/config.h
+HDR_ST = st/arg.h st/st.h st/win.h st/config.h master.h
SRC_DMENU = dmenu/dmenu.c dmenu/drw.c dmenu/util.c
HDR_DMENU = dmenu/arg.h dmenu/config.h dmenu/drw.h dmenu/util.h master.h
blob - 25826dc79e8eb34a5a22011e5ff2bde25cc2d078
blob + aad4f75d1ce5b3e4f053f1725a921501054275b6
--- config.mk
+++ config.mk
VERSION = "benni-0.1"
CPPFLAGS = -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DPREFIX=\"${PREFIX}\" -DVERSION=\"${VERSION}\"
-CFLAGS = -std=c99 -pedantic -Wall -O2 ${CPPFLAGS}
+CFLAGS = -std=c99 -pedantic -Wall -Wunused-parameter -O2 ${CPPFLAGS}
blob - 52ca6e88297272880735ad3ce4c28429648e39eb
blob + 05a7fb103a0d60461df53e5f32d7575f4bef0c0f
--- dwm/dwm.c
+++ dwm/dwm.c
}
/*void
-incnmaster(const Arg *arg)
+incnmaster(UNUSED const Arg *arg)
{
- (void)arg;
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0);
arrange(selmon);
}*/
}
void
-killclient(const Arg *arg)
+killclient(UNUSED const Arg *arg)
{
if (!selmon->sel)
return;
}
void
-movemouse(const Arg *arg)
+movemouse(UNUSED const Arg *arg)
{
int x, y, ocx, ocy, nx, ny;
Client *c;
}
void
-resizemouse(const Arg *arg)
+resizemouse(UNUSED const Arg *arg)
{
int ocx, ocy, nw, nh;
Client *c;
}
void
-sigchld(int unused)
+sigchld(UNUSED int unused)
{
if (signal(SIGCHLD, sigchld) == SIG_ERR)
die("can't install SIGCHLD handler:");
}
void
-sighup(int unused)
+sighup(UNUSED int unused)
{
Arg a = {.i = 1};
quit(&a);
}
void
-sigterm(int unused)
+sigterm(UNUSED int unused)
{
Arg a = {.i = 0};
quit(&a);
}
void
-togglebar(const Arg *arg)
+togglebar(UNUSED const Arg *arg)
{
selmon->showbar = !selmon->showbar;
updatebarpos(selmon);
}
void
-togglefloating(const Arg *arg)
+togglefloating(UNUSED const Arg *arg)
{
if (!selmon->sel)
return;
}
int
-xerrordummy(Display *dpy, XErrorEvent *ee)
+xerrordummy(UNUSED Display *dpy, UNUSED XErrorEvent *ee)
{
return 0;
}
/* Startup Error handler to check if another window manager
* is already running. */
int
-xerrorstart(Display *dpy, XErrorEvent *ee)
+xerrorstart(UNUSED Display *dpy, UNUSED XErrorEvent *ee)
{
die("dwm: another window manager is already running");
return -1;
}
void
-zoom(const Arg *arg)
+zoom(UNUSED const Arg *arg)
{
Client *c = selmon->sel;
blob - 2123b7845881ea3347470bd153b92623e41eeeba
blob + 42274df1731f0174eb3ebd0a0b28cbb082e5267d
--- master.h
+++ master.h
#define BUGREPORT "Benjamin Stürz <benni@stuerz.xyz>"
#define TOPBAR_FONT "monospace:size=6"
+
+#define UNUSED __attribute__((unused))
blob - 70b33f4a3774c601efd28473fa4e00d9beee342a
blob + 55083d1e0610a1f2cd1dbc5031f87405c0ba4ce8
--- pinentry-dmenu/pinentry/password-cache.c
+++ pinentry-dmenu/pinentry/password-cache.c
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "../../master.h"
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#endif
void
-password_cache_save (const char *keygrip, const char *password)
+password_cache_save (UNUSED const char *keygrip, UNUSED const char *password)
{
#ifdef HAVE_LIBSECRET
char *label;
}
char *
-password_cache_lookup (const char *keygrip)
+password_cache_lookup (UNUSED const char *keygrip)
{
#ifdef HAVE_LIBSECRET
GError *error = NULL;
error, 0 if the key is not found and 1 if the password was
removed. */
int
-password_cache_clear (const char *keygrip)
+password_cache_clear (UNUSED const char *keygrip)
{
#ifdef HAVE_LIBSECRET
GError *error = NULL;
blob - 3d5b2cd357bca4b88fb147472773efeb66844528
blob + afe89eee03e79224e5e016f8f5ac59fdfb685c34
--- pinentry-dmenu/pinentry/secmem.c
+++ pinentry-dmenu/pinentry/secmem.c
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
+
+#include "../../master.h"
#include <stdio.h>
#include <stdlib.h>
static void
-lock_pool( void *p, size_t n )
+lock_pool( UNUSED void *p, UNUSED size_t n )
{
#if defined(USE_CAPABILITIES) && defined(HAVE_MLOCK)
int err;
blob - 4b7de246c8f974888a0f6f54d24bf7a51e088ba5
blob + 8272aee3a914f1ea32402dce7cf79fe6135f63f3
--- st/st.c
+++ st/st.c
/* See LICENSE for license details. */
+#include "../master.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
}
void
-sigchld(int a)
+sigchld(UNUSED int a)
{
int stat;
pid_t p;
}
void
-sendbreak(const Arg *arg)
+sendbreak(UNUSED const Arg *arg)
{
if (tcsendbreak(cmdfd, 0))
perror("Error sending break");
}
void
-toggleprinter(const Arg *arg)
+toggleprinter(UNUSED const Arg *arg)
{
term.mode ^= MODE_PRINT;
}
void
-printscreen(const Arg *arg)
+printscreen(UNUSED const Arg *arg)
{
tdump();
}
void
-printsel(const Arg *arg)
+printsel(UNUSED const Arg *arg)
{
tdumpsel();
}
blob - ac2bc3c2e3921902680fa838a6b4d3c08de9cc48
blob + 0eb53fb1f68fa3a7d173dd38d53f1afd7a17a20b
--- st/x.c
+++ st/x.c
/* See LICENSE for license details. */
+#include "../master.h"
#include <errno.h>
#include <math.h>
#include <limits.h>
static uint buttons; /* bit field of pressed buttons */
void
-clipcopy(const Arg *dummy)
+clipcopy(UNUSED const Arg *dummy)
{
Atom clipboard;
}
void
-clippaste(const Arg *dummy)
+clippaste(UNUSED const Arg *dummy)
{
Atom clipboard;
}
void
-selpaste(const Arg *dummy)
+selpaste(UNUSED const Arg *dummy)
{
XConvertSelection(xw.dpy, XA_PRIMARY, xsel.xtarget, XA_PRIMARY,
xw.win, CurrentTime);
}
void
-numlock(const Arg *dummy)
+numlock(UNUSED const Arg *dummy)
{
win.mode ^= MODE_NUMLOCK;
}
}
void
-zoomreset(const Arg *arg)
+zoomreset(UNUSED const Arg *arg)
{
Arg larg;
}
int
-ximopen(Display *dpy)
+ximopen(UNUSED Display *dpy)
{
XIMCallback imdestroy = { .client_data = NULL, .callback = ximdestroy };
XICCallback icdestroy = { .client_data = NULL, .callback = xicdestroy };
}
void
-ximinstantiate(Display *dpy, XPointer client, XPointer call)
+ximinstantiate(Display *dpy, UNUSED XPointer client, UNUSED XPointer call)
{
if (ximopen(dpy))
XUnregisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL,
}
void
-ximdestroy(XIM xim, XPointer client, XPointer call)
+ximdestroy(UNUSED XIM xim, UNUSED XPointer client, UNUSED XPointer call)
{
xw.ime.xim = NULL;
XRegisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL,
}
int
-xicdestroy(XIC xim, XPointer client, XPointer call)
+xicdestroy(UNUSED XIC xim, UNUSED XPointer client, UNUSED XPointer call)
{
xw.ime.xic = NULL;
return 1;
}
void
-expose(XEvent *ev)
+expose(UNUSED XEvent *ev)
{
redraw();
}
}
void
-unmap(XEvent *ev)
+unmap(UNUSED XEvent *ev)
{
win.mode &= ~MODE_VISIBLE;
}