diff --git a/deps/math-neon/source/math_coshf.c b/deps/math-neon/source/math_coshf.c index a779b6a7be..c7c64e0d51 100644 --- a/deps/math-neon/source/math_coshf.c +++ b/deps/math-neon/source/math_coshf.c @@ -117,4 +117,4 @@ float coshf_neon_sfp(float x) #else return coshf_c(x); #endif -}; +} diff --git a/deps/math-neon/source/math_mat3.c b/deps/math-neon/source/math_mat3.c index aae178e179..70ed6b4456 100644 --- a/deps/math-neon/source/math_mat3.c +++ b/deps/math-neon/source/math_mat3.c @@ -106,7 +106,7 @@ void matvec3_neon(float m[9], float v[3], float d[3]) { #ifdef __MATH_NEON - int tmp; + int tmp = 0; asm volatile ( "mov %3, #12 \n\t" //r3 = 12 "vld1.32 {d0, d1}, [%1] \n\t" //Q0 = v diff --git a/deps/math-neon/source/math_sincosf.c b/deps/math-neon/source/math_sincosf.c index 365826f8ff..c9f4f39b61 100644 --- a/deps/math-neon/source/math_sincosf.c +++ b/deps/math-neon/source/math_sincosf.c @@ -48,11 +48,11 @@ void sincosf_c( float x, float r[2]) int i; } ax, bx; - float y; - float a, b, c, d, xx, yy; + float xx, yy; int m, n, o, p; - y = x + __sincosf_rng[1]; + float y = x + __sincosf_rng[1]; + ax.f = fabsf(x); bx.f = fabsf(y); diff --git a/deps/math-neon/source/math_sqrtf.c b/deps/math-neon/source/math_sqrtf.c index ee3f86bdbf..7f25b850d6 100644 --- a/deps/math-neon/source/math_sqrtf.c +++ b/deps/math-neon/source/math_sqrtf.c @@ -102,4 +102,4 @@ float sqrtf_neon_sfp(float x) #else return sqrtf_c(x); #endif -}; +} diff --git a/frontend/drivers/platform_psp.c b/frontend/drivers/platform_psp.c index 4e5db6d03f..f71b217a2a 100644 --- a/frontend/drivers/platform_psp.c +++ b/frontend/drivers/platform_psp.c @@ -318,9 +318,11 @@ static void frontend_psp_init(void *data) static void frontend_psp_exec(const char *path, bool should_load_game) { #if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER) || defined(VITA) - char argp[512] = {0}; +#ifdef IS_SALAMANDER char boot_params[1024]; char core_name[256]; +#endif + char argp[512] = {0}; SceSize args = 0; #if !defined(VITA) @@ -342,13 +344,15 @@ static void frontend_psp_exec(const char *path, bool should_load_game) RARCH_LOG("Attempt to load executable: %d [%s].\n", args, argp); #ifdef IS_SALAMANDER sceAppMgrGetAppParam(boot_params); - if (strstr(boot_params,"psgm:play")) { + if (strstr(boot_params,"psgm:play")) + { + int ret; char *param1 = strstr(boot_params, "¶m=")+7; char *param2 = strstr(boot_params, "¶m2="); memcpy(core_name, param1, param2 - param1); core_name[param2-param1] = 0; sprintf(argp, param2 + 8); - int ret = sceAppMgrLoadExec(core_name, (char * const*)((const char*[]){argp, 0}), NULL); + ret = sceAppMgrLoadExec(core_name, (char * const*)((const char*[]){argp, 0}), NULL); RARCH_LOG("Attempt to load executable: [%d].\n", ret); } else diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index 05b72390a4..099dab3f6f 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -458,7 +458,6 @@ static void vita2d_gfx_update_viewport(vita_video_t* vita, static void vita2d_gfx_set_viewport(void *data, unsigned viewport_width, unsigned viewport_height, bool force_full, bool allow_rotate) { - gfx_ctx_aspect_t aspect_data; int x = 0; int y = 0; float device_aspect = (float)viewport_width / viewport_height; @@ -468,10 +467,6 @@ static void vita2d_gfx_set_viewport(void *data, unsigned viewport_width, bool video_scale_integer = settings->bools.video_scale_integer; unsigned aspect_ratio_idx = settings->uints.video_aspect_ratio_idx; - aspect_data.aspect = &device_aspect; - aspect_data.width = viewport_width; - aspect_data.height = viewport_height; - if (video_scale_integer && !force_full) { video_viewport_get_scaled_integer(&vita->vp, diff --git a/gfx/drivers_display/gfx_display_vita2d.c b/gfx/drivers_display/gfx_display_vita2d.c index b856e75019..09807edf5a 100644 --- a/gfx/drivers_display/gfx_display_vita2d.c +++ b/gfx/drivers_display/gfx_display_vita2d.c @@ -131,9 +131,6 @@ static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw, vertices[i].a = *color++; } - const math_matrix_4x4 *mat = draw->matrix_data - ? (const math_matrix_4x4*)draw->matrix_data : (const math_matrix_4x4*)gfx_display_vita2d_get_default_mvp(vita2d); - switch (draw->pipeline.id) { default: diff --git a/input/drivers/psp_input.c b/input/drivers/psp_input.c index 93c56b882b..b436d2f91d 100644 --- a/input/drivers/psp_input.c +++ b/input/drivers/psp_input.c @@ -410,33 +410,31 @@ static bool psp_input_set_sensor_state(void *data, unsigned port, if(!psp) return false; - switch(action) + switch (action) { - case RETRO_SENSOR_ILLUMINANCE_ENABLE: - return false; - case RETRO_SENSOR_ILLUMINANCE_DISABLE: return true; - case RETRO_SENSOR_ACCELEROMETER_DISABLE: case RETRO_SENSOR_GYROSCOPE_DISABLE: if(psp->sensors_enabled) { - psp->sensors_enabled = false; - sceMotionMagnetometerOff(); - sceMotionStopSampling(); + psp->sensors_enabled = false; + sceMotionMagnetometerOff(); + sceMotionStopSampling(); } return true; - case RETRO_SENSOR_ACCELEROMETER_ENABLE: case RETRO_SENSOR_GYROSCOPE_ENABLE: if(!psp->sensors_enabled) { - psp->sensors_enabled = true; - sceMotionStartSampling(); - sceMotionMagnetometerOn(); + psp->sensors_enabled = true; + sceMotionStartSampling(); + sceMotionMagnetometerOn(); } return true; + case RETRO_SENSOR_DUMMY: + case RETRO_SENSOR_ILLUMINANCE_ENABLE: + break; } return false; diff --git a/libretro-common/net/net_compat.c b/libretro-common/net/net_compat.c index 2859675499..a3e57f83c9 100644 --- a/libretro-common/net/net_compat.c +++ b/libretro-common/net/net_compat.c @@ -217,9 +217,9 @@ int getaddrinfo_retro(const char *node, const char *service, if (!node && (hints->ai_flags & AI_PASSIVE)) in_addr->sin_addr.s_addr = INADDR_ANY; - else if (node && isdigit(*node)) + else if (node && isdigit((unsigned char)*node)) in_addr->sin_addr.s_addr = inet_addr(node); - else if (node && !isdigit(*node)) + else if (node && !isdigit((unsigned char)*node)) { struct hostent *host = (struct hostent*)gethostbyname(node); diff --git a/libretro-common/net/net_natt.c b/libretro-common/net/net_natt.c index 4bc85cdb3d..c8ce68761f 100644 --- a/libretro-common/net/net_natt.c +++ b/libretro-common/net/net_natt.c @@ -91,10 +91,7 @@ bool natt_new(struct natt_status *status) return true; } -void natt_free(struct natt_status *status) -{ - /* Nothing */ -} +void natt_free(struct natt_status *status) { } static bool natt_open_port(struct natt_status *status, struct sockaddr *addr, socklen_t addrlen, enum socket_protocol proto) diff --git a/network/netplay/netplay_discovery.c b/network/netplay/netplay_discovery.c index 3a868f5dfd..8c1fbd4c7e 100644 --- a/network/netplay/netplay_discovery.c +++ b/network/netplay/netplay_discovery.c @@ -89,7 +89,9 @@ static struct netplay_host_list discovered_hosts; static size_t discovered_hosts_allocated; /* Forward declarations */ +#ifdef HAVE_NETPLAYDISCOVERY static bool netplay_lan_ad_client(void); +#endif /** Initialize Netplay discovery (client) */ bool init_netplay_discovery(void) @@ -201,6 +203,7 @@ bool netplay_discovery_driver_ctl(enum rarch_netplay_discovery_ctl_state state, return true; } +#ifdef HAVE_NETPLAYDISCOVERY static bool init_lan_ad_server_socket(netplay_t *netplay, uint16_t port) { struct addrinfo *addr = NULL; @@ -226,6 +229,7 @@ error: RARCH_ERR("[discovery] Failed to initialize netplay advertisement socket\n"); return false; } +#endif /** * netplay_lan_ad_server @@ -404,6 +408,8 @@ bool netplay_lan_ad_server(netplay_t *netplay) } #ifdef HAVE_SOCKET_LEGACY + +#ifndef htons /* The fact that I need to write this is deeply depressing */ static int16_t htons_for_morons(int16_t value) { @@ -414,11 +420,12 @@ static int16_t htons_for_morons(int16_t value) val.l = htonl(value); return val.s[1]; } -#ifndef htons #define htons htons_for_morons #endif + #endif +#ifdef HAVE_NETPLAYDISCOVERY static bool netplay_lan_ad_client(void) { unsigned i; @@ -547,3 +554,4 @@ static bool netplay_lan_ad_client(void) return true; } +#endif