removed/commented unused macros

This commit is contained in:
Levi Neely 2024-06-29 13:53:30 +02:00
parent 7e06d44d76
commit 4fd31cdd67
14 changed files with 31 additions and 28 deletions

View File

@ -5,7 +5,7 @@ RANLIB=ranlib
USESSL=mbed USESSL=mbed
#CFLAGS=-Wall -Wpointer-arith -O2 -g -mtune=core2 #CFLAGS=-Wall -Wpointer-arith -O2 -g -mtune=core2
#CFLAGS=-Wall -Wpointer-arith -Wunused-function -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-label -Wunused-macros -Wunused-variable -Wuse-after-free -Wuseless-cast -Wunused-value -Wunused-parameter -Wunused-local-typedefs -O2 -g -fno-stack-protector -fomit-frame-pointer -mtune=core2 -I../sqlite -DP_ELECTRON -fPIC #CFLAGS=-Wunused-variable -Wuse-after-free -Wuseless-cast -Wunused-value -Wunused-parameter -Wunused-local-typedefs -O2 -g -fno-stack-protector -fomit-frame-pointer -mtune=core2 -I../sqlite -DP_ELECTRON -fPIC
CFLAGS=-O2 -g -fno-stack-protector -fomit-frame-pointer -mtune=core2 -I../sqlite -DP_ELECTRON -fPIC CFLAGS=-O2 -g -fno-stack-protector -fomit-frame-pointer -mtune=core2 -I../sqlite -DP_ELECTRON -fPIC
#CFLAGS=-Wall -Wpointer-arith -O2 -g -fsanitize=address -mtune=core2 #CFLAGS=-Wall -Wpointer-arith -O2 -g -fsanitize=address -mtune=core2

View File

@ -35,21 +35,25 @@
#include <string.h> #include <string.h>
#include <stddef.h> #include <stddef.h>
/*
commented definitions are unused, but kept because they may be
important later.
*/
#define RPARAM_STR1 0 #define RPARAM_STR1 0
#define RPARAM_STR2 1 //#define RPARAM_STR2 1
#define RPARAM_STR3 2 //#define RPARAM_STR3 2
#define RPARAM_STR4 3 #define RPARAM_STR4 3
#define RPARAM_RSTR1 4 #define RPARAM_RSTR1 4
#define RPARAM_RSTR2 5 //#define RPARAM_RSTR2 5
#define RPARAM_RSTR3 6 //#define RPARAM_RSTR3 6
#define RPARAM_RSTR4 7 #define RPARAM_RSTR4 7
#define RPARAM_NUM1 8 #define RPARAM_NUM1 8
#define RPARAM_NUM2 9 //#define RPARAM_NUM2 9
#define RPARAM_NUM3 10 //#define RPARAM_NUM3 10
#define RPARAM_NUM4 11 //#define RPARAM_NUM4 11
#define RPARAM_NUM5 12 //#define RPARAM_NUM5 12
#define RPARAM_NUM6 13 //#define RPARAM_NUM6 13
#define RPARAM_NUM7 14 //#define RPARAM_NUM7 14
#define RPARAM_NUM8 15 #define RPARAM_NUM8 15
#define RPARAM_HASH 16 #define RPARAM_HASH 16
#define RPARAM_ARRAY 17 #define RPARAM_ARRAY 17

View File

@ -43,8 +43,9 @@
#define hash_to_bucket(h) ((h)%CACHE_HASH_SIZE) #define hash_to_bucket(h) ((h)%CACHE_HASH_SIZE)
#define hash_to_lock(h) ((((h)*CACHE_LOCKS)/CACHE_HASH_SIZE)%CACHE_LOCKS) #define hash_to_lock(h) ((((h)*CACHE_LOCKS)/CACHE_HASH_SIZE)%CACHE_LOCKS)
#define CACHE_WAIT_FOR_TIMER 1 // unused, may be important later
#define CACHE_TIMER_CALLED 2 //#define CACHE_WAIT_FOR_TIMER 1
//#define CACHE_TIMER_CALLED 2
typedef struct { typedef struct {
psync_list list; psync_list list;

View File

@ -2506,8 +2506,6 @@ psync_invalidate_os_cache_needed(){
return 0; return 0;
} }
#define REBUILD_ICON_BUFFER_SIZE 1024
extern int overlays_running; extern int overlays_running;
void void

View File

@ -422,7 +422,8 @@ PSYNC_NOINLINE static int psync_has_hw_crc(){
} }
#define CRC32C_64BIT_HW(crc, data) asm("crc32q %[value], %[crcval]\n" : [crcval] "+r" (crc) : [value] "g" (data)) #define CRC32C_64BIT_HW(crc, data) asm("crc32q %[value], %[crcval]\n" : [crcval] "+r" (crc) : [value] "g" (data))
#define CRC32C_32BIT_HW(crc, data) asm("crc32l %[value], %[crcval]\n" : [crcval] "+r" (crc) : [value] "g" (data)) // unused, maybe important later
//#define CRC32C_32BIT_HW(crc, data) asm("crc32l %[value], %[crcval]\n" : [crcval] "+r" (crc) : [value] "g" (data))
#define CRC32C_8BIT_HW(crc, data) asm("crc32b %[value], %[crcval]\n" : [crcval] "+r" (crc) : [value] "g" (data)) #define CRC32C_8BIT_HW(crc, data) asm("crc32b %[value], %[crcval]\n" : [crcval] "+r" (crc) : [value] "g" (data))
#elif defined(CRC32_MSC) #elif defined(CRC32_MSC)

View File

@ -37,14 +37,11 @@
#include "pbusinessaccount.h" #include "pbusinessaccount.h"
#include "pdevicemap.h" #include "pdevicemap.h"
#define P_DEVICE_VERBOSE
#include "pdevice_monitor.h" #include "pdevice_monitor.h"
// #include "pdevicemap.h" // #include "pdevicemap.h"
#include "plocalscan.h" #include "plocalscan.h"
#include "ptimer.h" #include "ptimer.h"
#define _strdup strdup
#define DEV_MONITOR_ACTIVITY_TIMER_INT 20 #define DEV_MONITOR_ACTIVITY_TIMER_INT 20
static pthread_mutex_t devmon_mutex=PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t devmon_mutex=PTHREAD_MUTEX_INITIALIZER;

View File

@ -81,7 +81,7 @@ typedef off_t fuse_off_t;
#define openfile_to_fh(x) ((uintptr_t)x) #define openfile_to_fh(x) ((uintptr_t)x)
#define FS_BLOCK_SIZE 4096 #define FS_BLOCK_SIZE 4096
#define FS_MAX_WRITE 16*1024*1024 //#define FS_MAX_WRITE 16*1024*1024 // unused, maybe important later
#if defined(P_OS_LINUX) #if defined(P_OS_LINUX)
#define PSYNC_FS_ERR_CRYPTO_EXPIRED EROFS #define PSYNC_FS_ERR_CRYPTO_EXPIRED EROFS

View File

@ -43,9 +43,9 @@
#define PSYNC_CRYPTO_LOG_DATA 1 #define PSYNC_CRYPTO_LOG_DATA 1
#define PSYNC_CRYPTO_LOG_INT 2 #define PSYNC_CRYPTO_LOG_INT 2
#define PSYNC_CRYPTO_HASH_TREE_SHIFT 8 //#define PSYNC_CRYPTO_HASH_TREE_SHIFT 8 // unused, maybe important later
#define PSYNC_LOG_STATUS_INCOMPLETE 0 //#define PSYNC_LOG_STATUS_INCOMPLETE 0 // unused, maybe important later
#define PSYNC_LOG_STATUS_FINALIZED 1 #define PSYNC_LOG_STATUS_FINALIZED 1
#define PSYNC_LOG_HASHID_FH256 0 #define PSYNC_LOG_HASHID_FH256 0

View File

@ -30,7 +30,6 @@
*/ */
#define FUSE_USE_VERSION 26 #define FUSE_USE_VERSION 26
#define _FILE_OFFSET_BITS 64
#include "pfsxattr.h" #include "pfsxattr.h"
#include "plibs.h" #include "plibs.h"

View File

@ -1965,7 +1965,7 @@ struct psync_task_t_{
int status; int status;
}; };
#define PSYNC_WAIT_ANYBODY -1 //#define PSYNC_WAIT_ANYBODY -1 // unused, but may be important later
#define PSYNC_WAIT_NOBODY -2 #define PSYNC_WAIT_NOBODY -2
#define PSYNC_WAIT_FREED -3 #define PSYNC_WAIT_FREED -3

View File

@ -29,7 +29,6 @@
DAMAGE. DAMAGE.
*/ */
#define __STDC_FORMAT_MACROS
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <stdarg.h> #include <stdarg.h>

View File

@ -62,7 +62,9 @@ static void fsroot_change(){
} }
#define PSYNC_SETTING_owneremail 16 #define PSYNC_SETTING_owneremail 16
#define PSYNC_SETTING_cryptosetup 17
// unused but may be important later
//#define PSYNC_SETTING_cryptosetup 17
static psync_setting_t settings[]={ static psync_setting_t settings[]={
{"usessl", psync_timer_do_notify_exception, NULL, {PSYNC_USE_SSL_DEFAULT}, PSYNC_TBOOL}, {"usessl", psync_timer_do_notify_exception, NULL, {PSYNC_USE_SSL_DEFAULT}, PSYNC_TBOOL},

View File

@ -673,7 +673,7 @@ psync_rsa_signature_t psync_ssl_rsa_sign_sha256_hash(psync_rsa_privatekey_t rsa,
#define xmm0_xmm3 "0xD8" #define xmm0_xmm3 "0xD8"
#define xmm0_xmm4 "0xE0" #define xmm0_xmm4 "0xE0"
#define xmm0_xmm5 "0xE8" #define xmm0_xmm5 "0xE8"
#define xmm1_xmm0 "0xC1" //#define xmm1_xmm0 "0xC1" // unused, may be important later
#define xmm1_xmm2 "0xD1" #define xmm1_xmm2 "0xD1"
#define xmm1_xmm3 "0xD9" #define xmm1_xmm3 "0xD9"
#define xmm1_xmm4 "0xE1" #define xmm1_xmm4 "0xE1"

View File

@ -179,7 +179,9 @@ static int do_run_command(const char *cmd, size_t cmdlen, const binparam *params
} }
#define run_command(cmd, params) do_run_command(cmd, strlen(cmd), params, sizeof(params)/sizeof(binparam)) #define run_command(cmd, params) do_run_command(cmd, strlen(cmd), params, sizeof(params)/sizeof(binparam))
#define run_command_res(cmd, params) do_run_command_res(cmd, strlen(cmd), params, sizeof(params)/sizeof(binparam))
// unused, may be important later
//#define run_command_res(cmd, params) do_run_command_res(cmd, strlen(cmd), params, sizeof(params)/sizeof(binparam))
static int task_createfolder(psync_syncid_t syncid, psync_folderid_t localfolderid, const char *name){ static int task_createfolder(psync_syncid_t syncid, psync_folderid_t localfolderid, const char *name){
psync_sql_res *res; psync_sql_res *res;