mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
comparison of integers of different signs [-Wsign-compare]
This commit is contained in:
parent
ce606b51fc
commit
97676d3210
17 changed files with 85 additions and 86 deletions
19
client/ui.c
19
client/ui.c
|
@ -18,7 +18,8 @@
|
|||
#include "ui.h"
|
||||
|
||||
double CursorScaleFactor = 1;
|
||||
int PlotGridX = 0, PlotGridY = 0, PlotGridXdefault = 64, PlotGridYdefault = 64, CursorCPos = 0, CursorDPos = 0;
|
||||
int PlotGridX = 0, PlotGridY = 0, PlotGridXdefault = 64, PlotGridYdefault = 64;
|
||||
uint32_t CursorCPos = 0, CursorDPos = 0;
|
||||
bool flushAfterWrite = 0;
|
||||
int GridOffset = 0;
|
||||
bool GridLocked = false;
|
||||
|
@ -33,13 +34,13 @@ void PrintAndLogOptions(const char *str[][2], size_t size, size_t space) {
|
|||
char buff[2000] = "Options:\n";
|
||||
char format[2000] = "";
|
||||
size_t counts[2] = {0, 0};
|
||||
for (int i = 0; i < size; i++)
|
||||
for (int j = 0 ; j < 2 ; j++)
|
||||
for (size_t i = 0; i < size; i++)
|
||||
for (size_t j = 0 ; j < 2 ; j++)
|
||||
if (counts[j] < strlen(str[i][j])) {
|
||||
counts[j] = strlen(str[i][j]);
|
||||
}
|
||||
for (int i = 0; i < size; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
for (size_t j = 0; j < 2; j++) {
|
||||
if (j == 0)
|
||||
snprintf(format, sizeof(format), "%%%zus%%%zus", space, counts[j]);
|
||||
else
|
||||
|
@ -203,8 +204,6 @@ void SetFlushAfterWrite(bool value) {
|
|||
|
||||
void iceIIR_Butterworth(int *data, const size_t len) {
|
||||
|
||||
int i, j;
|
||||
|
||||
int *output = (int *) calloc(sizeof(int) * len, sizeof(uint8_t));
|
||||
if (!output) return;
|
||||
|
||||
|
@ -219,7 +218,7 @@ void iceIIR_Butterworth(int *data, const size_t len) {
|
|||
float b[3] = {0.003621681514929, 0.007243363029857, 0.003621681514929};
|
||||
float a[3] = {1.000000000000000, -1.822694925196308, 0.837181651256023};
|
||||
|
||||
for (i = 0; i < adjustedLen; ++i) {
|
||||
for (size_t i = 0; i < adjustedLen; ++i) {
|
||||
|
||||
float sample = data[i]; // input sample read from array
|
||||
float complex x_prime = 1.0f; // save sample for estimating frequency
|
||||
|
@ -246,7 +245,7 @@ void iceIIR_Butterworth(int *data, const size_t len) {
|
|||
|
||||
// show data
|
||||
//memcpy(data, output, adjustedLen);
|
||||
for (j = 0; j < adjustedLen; ++j)
|
||||
for (size_t j = 0; j < adjustedLen; ++j)
|
||||
data[j] = output[j];
|
||||
|
||||
free(output);
|
||||
|
@ -260,7 +259,7 @@ void iceSimple_Filter(int *data, const size_t len, uint8_t k) {
|
|||
int32_t filter_reg = 0;
|
||||
int8_t shift = (k <= 8) ? k : FILTER_SHIFT;
|
||||
|
||||
for (int i = 0; i < len; ++i) {
|
||||
for (size_t i = 0; i < len; ++i) {
|
||||
// Update filter with current sample
|
||||
filter_reg = filter_reg - (filter_reg >> shift) + data[i];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue