Commit Graph

19 Commits

Author SHA1 Message Date
libretroadmin
c2b81881ae Cleanups 2023-09-02 16:42:49 +02:00
libretroadmin
40a0ced947 Be consistent with frontend_driver_get_core_extension - core extension
var should at most be 16 chars big, make only one exception once
2023-08-15 15:01:57 +02:00
libretroadmin
90115e2dc9 Silence warnings; code cleanups 2023-05-28 22:43:33 +02:00
LibretroAdmin
b2634ea588 * Create fill_pathname_join_special - and specify fill_pathname_join
as deprecated.
* Use fill_pathname_join_special in the vast majority of cases where
we can ensure out_path is a new empty string
* Get rid of some extension concatenation with strlcat where encountered
* Some general cleanups with NULL termination of strings that get immediately
passed to strlcpy/strlcpy-adjacent functions
2022-08-04 14:19:38 +02:00
LibretroAdmin
c7a1d83675 (libretro-common) Start documenting leaf functon calls in function documentation
(libretro-common) docs - document when string has to be non-NULL or else UB (undefined behavior)
(libretro-common) stdstring.c - string_hex_to_unsigned - make strlen call unneeded
2022-08-01 09:52:39 +02:00
libretroadmin
e865ea83bd * Don't NULL terminate string if we pass it to strlcpy and/or a
file_path function that calls strlcpy under the hood
* Replace some snprintf calls to strlcpy/strlcat
2022-07-22 22:23:54 +02:00
twinaphex
a0955d4fa6 Fix potentially bad regression - would crash on any platform where unsigned long is more than 32 bits (not sure if any platform has this, however) 2021-09-30 17:19:38 +02:00
Nathan Strong
fb86ca6e33 Fix the snprintf warnings for everyone this time
== DETAILS
So, basically this back-and-forth is because we used fixed-size
data types (i.e. `uint32_t`) which maps to different primitive data
types on different platforms. So `uint32_t` might be a `long` on some
platforms (e.g. Wii U), while it's just a plain integer on others (PC).
And the format specifier works off primitive data type, not data type
size.

So, to resolve this, we:

- keep `%lx` as the format specifier
- cast the parameter to printf to unsigned long

This is better than the alternatives that could cause problems trying to
cast a long down to an int.
2021-09-25 15:08:34 -07:00
Nathan Strong
9b2d4236ad WIIU: Clean up a bunch of compiler warnings
== DETAILS
These changes fall into a few broad categories:

1. Explicitly undefine things we want to re-define due to conflicts with
   the version of devkitpro we're using
2. Clean up hex format specifiers to use `%lx` or `%lX` when working with
   long integers
3. Move variables inside the ifdef they're used in to squelch "unused variable"
   messages
4. Add parenthesis to make Wii U shader declarations stop complaining

And then there's a weird "misleading indent" warning that I fixed by just
rewriting a block of code to use a switch statement instead of if-then-else.

These changes work fine on Wii U, but we'll need to keep an eye on CI/CD to see
if other platform builds break.
2021-09-25 13:25:39 -07:00
twinaphex
0482892a9c Get rid of return variable for snprintf 2021-05-18 23:09:45 +02:00
twinaphex
4df6d287e3 (Clang) Silence 'n' is never used warnings 2021-02-03 11:48:33 +01:00
twinaphex
320cc443a8 Reorder structs, alignment 2020-09-01 01:28:33 +02:00
twinaphex
4ec216dc0b Get rid of file_path_str 2020-08-22 01:06:10 +02:00
twinaphex
4ee45304b0 More warning fixes 2020-08-01 18:14:48 +02:00
twinaphex
4c86e67c6e core_backup_list_init - prevent garbage values 2020-06-29 19:18:43 +02:00
twinaphex
dc35458761 Turn calloc into malloc 2020-06-29 03:49:56 +02:00
jdgleaver
2782b87267 Add option to automatically backup cores when updating 2020-06-16 11:12:22 +01:00
jdgleaver
f78c0a8cc9 Fix licensing of core_backup.h/.c 2020-06-04 13:22:46 +01:00
jdgleaver
0a33e562f4 Add option to backup/restore installed cores 2020-06-04 12:20:58 +01:00