Skip to content

Commit

Permalink
Mark suitable variables and functions static
Browse files Browse the repository at this point in the history
  • Loading branch information
emaxx-google committed Oct 23, 2024
1 parent 4841404 commit c1d9e3b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/ccid_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,16 @@ typedef struct
#include "ccid_serial.h"

/* data rates supported by the GemPC Twin (serial and PCMCIA) */
unsigned int SerialTwinDataRates[] = { ISO_DATA_RATES, 0 };
static unsigned int SerialTwinDataRates[] = { ISO_DATA_RATES, 0 };

/* data rates supported by the GemPC PinPad, GemCore Pos Pro & SIM Pro */
unsigned int SerialExtendedDataRates[] = { ISO_DATA_RATES, 500000, 0 };
static unsigned int SerialExtendedDataRates[] = { ISO_DATA_RATES, 500000, 0 };

/* data rates supported by the secondary slots on the GemCore Pos Pro & SIM Pro */
unsigned int SerialCustomDataRates[] = { GEMPLUS_CUSTOM_DATA_RATES, 0 };
static unsigned int SerialCustomDataRates[] = { GEMPLUS_CUSTOM_DATA_RATES, 0 };

/* data rates supported by the GemCore SIM Pro 2 */
unsigned int SIMPro2DataRates[] = { SIMPRO2_ISO_DATA_RATES, 0 };
static unsigned int SIMPro2DataRates[] = { SIMPRO2_ISO_DATA_RATES, 0 };

/* no need to initialize to 0 since it is static */
static _serialDevice serialDevice[CCID_DRIVER_MAX_READERS];
Expand Down
6 changes: 3 additions & 3 deletions src/ccid_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
/* Using the default libusb context */
/* does not work for libusb <= 1.0.8 */
/* #define ctx NULL */
libusb_context *ctx = NULL;
static libusb_context *ctx = NULL;

#define CCID_INTERRUPT_SIZE 8

Expand Down Expand Up @@ -137,7 +137,7 @@ static void Multi_PollingTerminate(struct usbDevice_MultiSlot_Extension *msExt);

static int get_end_points(const struct libusb_interface *usb_interface,
_usbDevice *usbdevice);
bool ccid_check_firmware(struct libusb_device_descriptor *desc);
static bool ccid_check_firmware(struct libusb_device_descriptor *desc);
static unsigned int *get_data_rates(unsigned int reader_index,
const unsigned char bNumDataRatesSupported);

Expand Down Expand Up @@ -182,7 +182,7 @@ static struct _bogus_firmware Bogus_firmwares[] = {
};

/* data rates supported by the secondary slots on the GemCore Pos Pro & SIM Pro */
unsigned int SerialCustomDataRates[] = { GEMPLUS_CUSTOM_DATA_RATES, 0 };
static unsigned int SerialCustomDataRates[] = { GEMPLUS_CUSTOM_DATA_RATES, 0 };

/*****************************************************************************
*
Expand Down
2 changes: 1 addition & 1 deletion src/ifdhandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static pthread_mutex_t ifdh_context_mutex = PTHREAD_MUTEX_INITIALIZER;

_Atomic int LogLevel = DEBUG_LEVEL_CRITICAL | DEBUG_LEVEL_INFO;
int DriverOptions = 0;
int PowerOnVoltage = -1;
static int PowerOnVoltage = -1;
static bool DebugInitialized = false;

/* local functions */
Expand Down
2 changes: 1 addition & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "utils.h"
#include "debug.h"

_Atomic int ReaderIndex[CCID_DRIVER_MAX_READERS];
static _Atomic int ReaderIndex[CCID_DRIVER_MAX_READERS];
#define FREE_ENTRY -42

void InitReaderIndex(void)
Expand Down

0 comments on commit c1d9e3b

Please sign in to comment.