From 221dab875d4756a11ba1418a75a05b8b486968e7 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Wed, 10 Oct 2012 02:59:53 +0000 Subject: Quieting a warning found by Clang's static analyzer. Properly clean up after ourselves. Our code doesn't use Carbon, and implicitly links to System.framework (which, on OS X, is just a pointer to libSystem). Don't include debugging symbols on release builds. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@80326 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfinput/pad.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins/dfinput') diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c index 12251104..1074b9ae 100644 --- a/plugins/dfinput/pad.c +++ b/plugins/dfinput/pad.c @@ -456,6 +456,12 @@ unsigned char PADpoll(unsigned char value) { } } + //makes it so that the following switch doesn't try to dereference a null pointer + //quiets a warning in the Clang static analyzer. + if (buf == NULL) { + return 0; + } + switch (CurCmd) { case CMD_READ_DATA_AND_VIBRATE: if (g.cfg.PadDef[CurPad].Type == PSE_PAD_TYPE_ANALOGPAD) { -- cgit v1.2.3