lib: qrcode: remove #pragma mark directives

Remove Xcode-specific #pragma directives, not recognized by GCC and
triggering the -Wunknown-pragma warning

Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
This commit is contained in:
Silvano Seva 2026-04-29 21:29:01 +02:00
parent 993897a841
commit 3e888f014a

View file

@ -38,7 +38,6 @@
#include <stdlib.h>
#include <string.h>
#pragma mark - Error Correction Lookup tables
#if LOCK_VERSION == 0
@ -101,7 +100,6 @@ static int abs(int value) {
*/
#pragma mark - Mode testing and conversion
static int8_t getAlphanumeric(char c) {
@ -140,7 +138,6 @@ static bool isNumeric(const char *text, uint16_t length) {
}
#pragma mark - Counting
// We store the following tightly packed (less 8) in modeInfo
// <=9 <=26 <= 40
@ -167,7 +164,6 @@ static char getModeBits(uint8_t version, uint8_t mode) {
}
#pragma mark - BitBucket
typedef struct BitBucket {
uint32_t bitOffsetOrWidth;
@ -251,7 +247,6 @@ static bool bb_getBit(BitBucket *bitGrid, uint8_t x, uint8_t y) {
}
#pragma mark - Drawing Patterns
// XORs the data modules in this QR Code with the given mask pattern. Due to XOR's mathematical
// properties, calling applyMask(m) twice with the same value is equivalent to no change at all.
@ -474,7 +469,6 @@ static void drawCodewords(BitBucket *modules, BitBucket *isFunction, BitBucket *
#pragma mark - Penalty Calculation
#define PENALTY_N1 3
#define PENALTY_N2 3
@ -574,7 +568,6 @@ static uint32_t getPenaltyScore(BitBucket *modules) {
}
#pragma mark - Reed-Solomon Generator
static uint8_t rs_multiply(uint8_t x, uint8_t y) {
// Russian peasant multiplication
@ -628,7 +621,6 @@ static void rs_getRemainder(uint8_t degree, uint8_t *coeff, uint8_t *data, uint8
#pragma mark - QrCode
static int8_t encodeDataCodewords(BitBucket *dataCodewords, const uint8_t *text, uint16_t length, uint8_t version) {
int8_t mode = MODE_BYTE;
@ -769,7 +761,6 @@ static void performErrorCorrection(uint8_t version, uint8_t ecc, BitBucket *data
static const uint8_t ECC_FORMAT_BITS = (0x02 << 6) | (0x03 << 4) | (0x00 << 2) | (0x01 << 0);
#pragma mark - Public QRCode functions
uint16_t qrcode_getBufferSize(uint8_t version) {
return bb_getGridSizeBytes(4 * version + 17);