mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-19 21:03:23 -07:00
Fix gcc10 compiler warnings
- fix attribute format for MINGW in tinycbor/cbor.h - add pragma to prevent "unaligned pointer" warning in cmddata.c. We know what we are doing there. - whitespace fixes
This commit is contained in:
parent
ad326d84ad
commit
8ac5d5cba1
2 changed files with 59 additions and 52 deletions
|
@ -815,7 +815,7 @@ int FSKrawDemod(const char *Cmd, bool verbose)
|
|||
setDemodBuf(BitStream,size,0);
|
||||
setClockGrid(rfLen, startIdx);
|
||||
|
||||
// Now output the bitstream to the scrollback by line of 16 bits
|
||||
// Now output the bitstream to the scrollback by line of 16 bits
|
||||
if (verbose || g_debugMode) {
|
||||
PrintAndLog("\nUsing Clock:%u, invert:%u, fchigh:%u, fclow:%u", (unsigned int)rfLen, (unsigned int)invert, (unsigned int)fchigh, (unsigned int)fclow);
|
||||
PrintAndLog("%s decoded bitstream:",GetFSKType(fchigh,fclow,invert));
|
||||
|
@ -1206,13 +1206,16 @@ int getSamples(int n, bool silent)
|
|||
uint8_t bits_per_sample = 8;
|
||||
|
||||
//Old devices without this feature would send 0 at arg[0]
|
||||
if(response.arg[0] > 0)
|
||||
{
|
||||
if(response.arg[0] > 0) {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
|
||||
sample_config *sc = (sample_config *) response.d.asBytes;
|
||||
#pragma GCC diagnostic pop
|
||||
if (!silent) PrintAndLog("Samples @ %d bits/smpl, decimation 1:%d ", sc->bits_per_sample
|
||||
, sc->decimation);
|
||||
bits_per_sample = sc->bits_per_sample;
|
||||
}
|
||||
|
||||
if(bits_per_sample < 8)
|
||||
{
|
||||
if (!silent) PrintAndLog("Unpacking...");
|
||||
|
|
|
@ -581,7 +581,11 @@ enum CborPrettyFlags {
|
|||
|
||||
typedef CborError (*CborStreamFunction)(void *token, const char *fmt, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__format__(printf, 2, 3)))
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
__attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3)))
|
||||
#else
|
||||
__attribute__((__format__(printf, 2, 3)))
|
||||
#endif
|
||||
#endif
|
||||
;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue