From 5b2b4fecf71a0ff8db4b50ba6c431472bf973f8e Mon Sep 17 00:00:00 2001
From: Ludovic Rousseau <ludovic.rousseau+github@gmail.com>
Date: Fri, 20 Apr 2012 11:29:50 +0200
Subject: [PATCH 5/5] Do not use an explicit inline
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The C compiler is much better than us to know when to inline a function
or not.
This also fixes a lot of compiler warnings:

xusb.c: In function ‘perr’:
xusb.c:59:19: warning: function ‘perr’ can never be inlined because it uses variable argument lists [-Winline]
  CC     dpfp_threaded-dpfp_threaded.o
xusb.c: In function ‘set_xbox_actuators’:
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:292:2: warning: called from here [-Winline]
xusb.c: In function ‘get_mass_storage_status’:
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:369:7: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:373:7: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:377:7: warning: called from here [-Winline]
xusb.c: In function ‘send_mass_storage_command.constprop.0’:
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:310:7: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:316:7: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:345:7: warning: called from here [-Winline]
xusb.c: In function ‘get_sense’:
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:419:7: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:421:7: warning: called from here [-Winline]
  CCLD   listdevs
xusb.c: In function ‘test_device’:
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:608:7: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:629:2: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:643:2: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:692:8: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:700:8: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:561:8: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:574:8: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:176:2: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:182:2: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:189:2: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:724:3: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:264:2: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:727:3: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:728:3: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:730:3: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:451:7: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:463:2: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:486:2: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:498:7: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:518:9: warning: called from here [-Winline]
xusb.c:59:19: warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
xusb.c:733:3: warning: called from here [-Winline]
---
 examples/xusb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/xusb.c b/examples/xusb.c
index fe2785f..07935d4 100644
--- a/examples/xusb.c
+++ b/examples/xusb.c
@@ -56,7 +56,7 @@
 bool binary_dump = false;
 char binary_name[64];
 
-inline static int perr(char const *format, ...)
+static int perr(char const *format, ...)
 {
 	va_list args;
 	int r;
-- 
1.7.9.5

