Commit ff2899df authored by phdeswer's avatar phdeswer

Fix missing CFLAGS, fix warnings shown

Signed-off-by: phdeswer's avatarPhilippe De Swert <philippedeswert@gmail.com>
parent 5ae0b873
......@@ -18,22 +18,9 @@ test_gcc_flag() {
return $ret
}
# If using GCC specify some additional parameters
if test "x$GCC" = "xyes" ; then
# We use gnu99 instead of c99 because many have interpreted the standard
# in a way that int64_t isn't defined on non-64 bit platforms.
DESIRED_FLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wmissing-noreturn -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
for flag in $DESIRED_FLAGS ; do
AC_MSG_CHECKING([whether $CC accepts $flag])
if test_gcc_flag $flag ; then
CFLAGS="$CFLAGS $flag"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
done
fi
# We use gnu99 instead of c99 because many have interpreted the standard
# in a way that int64_t isn't defined on non-64 bit platforms.
CFLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[Enable debug @<:@default=false@:>@]),
[case "${enableval}" in
......
......@@ -238,8 +238,6 @@ static void report_mass_storage_blocker(const char *mountpoint, int try)
/* TODO: clean up buteo-mtp hack */
int set_mtp_mode(void)
{
int pid = 1;
mkdir("/dev/mtp", S_IRWXO|S_IRWXU);
system("mount -t functionfs mtp -o gid=1000,mode=0770 /dev/mtp\n");
system("systemctl start buteo-mtp.service\n");
......
......@@ -87,7 +87,7 @@ int usb_network_up(void)
if(gateway)
{
sprintf(command, "route add default gw %s %s\n", gateway);
sprintf(command, "route add default gw %s\n", gateway);
system(command);
}
......
......@@ -59,9 +59,9 @@ guint charging_timeout = 0;
gboolean special_mode = FALSE;
guint timeout_source = 0;
#endif /* NOKIA */
#ifdef APP_SYNC
#ifdef DYN_SYNC
static GList *modelist;
#endif /* APP_SYNC */
#endif /* DYN_SYNC */
/* static helper functions */
static gboolean set_disconnected(gpointer data);
......@@ -307,6 +307,8 @@ end:
set_usb_module(MODULE_NONE);
mode = MODE_UNDEFINED;
}
if(net)
log_debug("Network setting failed!\n");
free(current_mode.mode);
current_mode.mode = strdup(mode);
usb_moded_send_signal(get_usb_mode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment