mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 21:26:43 +00:00
Fix compiler warning
This commit is contained in:
parent
2facfff7f5
commit
63b393aedd
@ -91,7 +91,7 @@ static int numCharCountBits(enum qrcodegen_Mode mode, int version);
|
|||||||
|
|
||||||
// The set of all legal characters in alphanumeric mode, where each character
|
// The set of all legal characters in alphanumeric mode, where each character
|
||||||
// value maps to the index in the string. For checking text and encoding segments.
|
// value maps to the index in the string. For checking text and encoding segments.
|
||||||
static const char[] PROGMEM = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%%*+-./:";
|
static const char ALPHANUMERIC_CHARSET[] PROGMEM = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%%*+-./:";
|
||||||
|
|
||||||
// For generating error correction codes.
|
// For generating error correction codes.
|
||||||
testable const int8_t ECC_CODEWORDS_PER_BLOCK[4][41] PROGMEM = {
|
testable const int8_t ECC_CODEWORDS_PER_BLOCK[4][41] PROGMEM = {
|
||||||
@ -785,7 +785,7 @@ static bool getBit(int x, int i)
|
|||||||
bool qrcodegen_isAlphanumeric(const char * text)
|
bool qrcodegen_isAlphanumeric(const char * text)
|
||||||
{
|
{
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
snprintf_P(buffer, sizeof(64), ALPHANUMERIC_CHARSET);
|
snprintf_P(buffer, sizeof(buffer), ALPHANUMERIC_CHARSET);
|
||||||
|
|
||||||
assert(text != NULL);
|
assert(text != NULL);
|
||||||
for(; *text != '\0'; text++) {
|
for(; *text != '\0'; text++) {
|
||||||
@ -895,7 +895,7 @@ struct qrcodegen_Segment qrcodegen_makeNumeric(const char * digits, uint8_t buf[
|
|||||||
// Public function - see documentation comment in header file.
|
// Public function - see documentation comment in header file.
|
||||||
struct qrcodegen_Segment qrcodegen_makeAlphanumeric(const char * text, uint8_t buf[])
|
struct qrcodegen_Segment qrcodegen_makeAlphanumeric(const char * text, uint8_t buf[])
|
||||||
{
|
{
|
||||||
char buffer[128];
|
char buffer[64];
|
||||||
snprintf_P(buffer, sizeof(buffer), ALPHANUMERIC_CHARSET);
|
snprintf_P(buffer, sizeof(buffer), ALPHANUMERIC_CHARSET);
|
||||||
|
|
||||||
assert(text != NULL);
|
assert(text != NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user