reserved identifier violation
SF Markus Elfring
Hello,
I would like to point out that identifiers like "__INCLUDE_GUARD_DISPLAY_H_" and "_INCLUDE_GUARD_AHCI_H" do not fit to the expected naming convention of the C++ language standard.
Would you like to adjust your selection for unique names?
https://www.securecoding.cert.org/confluence/display/cplusplus/DCL32-CPP.+Do+not+declare+or+define+a+reserved+identifier#DCL32-CPP.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample%28HeaderGuard%29
https://github.com/fenrus75/powertop/blob/54956f7407c0e369665cd9712a189f601c6ab545/src/display.h#L25
https://github.com/fenrus75/powertop/blob/d7455ba1d0125efed4780a2114ef66165d0cadc1/src/devices/ahci.h#L25
Regards,
Markus
Alexandra Yates
Quoted 14 lines
Hello,
I would like to point out that identifiers like "
__INCLUDE_GUARD_DISPLAY_H_" and
"_INCLUDE_GUARD_AHCI_H" do not fit to the expected naming convention of the C++
language standard.
Would you like to adjust your selection for unique names?
https://www.securecoding.cert.org/confluence/display/cplusplus/DCL32-CPP.+Do+not+declare+or+define+a+reserved+identifier#DCL32-CPP.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample%28HeaderGuard%29https://github.com/fenrus75/powertop/blob/54956f7407c0e369665cd9712a189f601c6ab545/src/display.h#L25
https://github.com/fenrus75/powertop/blob/d7455ba1d0125efed4780a2114ef66165d0cadc1/src/devices/ahci.h#L25
Quoted 7 lines
Regards,
Markus
_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop
Hi Markus,
The reference link is not working. If you feel very strongly about this please send your patches to the mailing list.
Thank you,
Alexandra.
SF Markus Elfring
Quoted 2 lines
If you feel very strongly about this please send your patches to the mailing list.
Would you like to integrate the attached update suggestion into your source code repository?
How do you want to proceed with the remaining update candidates?
Regards,
Markus
Quoted 1 line
From
08f409792d47d59375882fcc165ef79d60643e72Mon Sep 17 00:00:00 2001
From: Markus Elfring <[email protected]>
Date: Fri, 31 Oct 2014 14:34:00 +0100
Subject: [PATCH] Include guards became unique.
Some include guards did not fit to the expected naming convention of the C++ language standard. This detail was fixed by the addition of a prefix.
The probability for name clashes was also reduced by the addition of a kind of universally unique identifier as a suffix.
--- src/calibrate/calibrate.h | 4 ++-- src/cpu/cpu.h | 4 ++-- src/cpu/cpu_rapl_device.h | 4 ++-- src/cpu/cpudevice.h | 4 ++-- src/cpu/dram_rapl_device.h | 4 ++-- src/cpu/rapl/rapl_interface.h | 4 ++-- src/devices/ahci.h | 4 ++-- src/devices/alsa.h | 4 ++-- src/devices/backlight.h | 4 ++-- src/devices/device.h | 4 ++-- src/devices/gpu_rapl_device.h | 4 ++-- src/devices/i915-gpu.h | 4 ++-- src/devices/network.h | 4 ++-- src/devices/rfkill.h | 4 ++-- src/devices/runtime_pm.h | 4 ++-- src/devices/thinkpad-fan.h | 4 ++-- src/devices/thinkpad-light.h | 4 ++-- src/devices/usb.h | 4 ++-- src/devlist.h | 4 ++-- src/display.h | 4 ++-- src/lib.h | 4 ++-- src/measurement/acpi.h | 4 ++-- src/measurement/extech.h | 4 ++-- src/measurement/measurement.h | 4 ++-- src/measurement/sysfs.h | 4 ++-- src/parameters/parameters.h | 4 ++-- src/perf/perf.h | 4 ++-- src/perf/perf_bundle.h | 4 ++-- src/perf/perf_event.h | 4 ++-- src/process/interrupt.h | 4 ++-- src/process/powerconsumer.h | 4 ++-- src/process/process.h | 4 ++-- src/process/processdevice.h | 4 ++-- src/process/timer.h | 4 ++-- src/process/work.h | 4 ++-- src/report/report-formatter-base.h | 4 ++-- src/report/report-formatter-csv.h | 4 ++-- src/report/report-formatter-html.h | 4 ++-- src/report/report-formatter.h | 4 ++-- src/report/report-maker.h | 4 ++-- src/report/report.h | 4 ++-- src/tuning/bluetooth.h | 4 ++-- src/tuning/ethernet.h | 4 ++-- src/tuning/iw.h | 4 ++-- src/tuning/nl80211.h | 4 ++-- src/tuning/runtime.h | 4 ++-- src/tuning/tunable.h | 4 ++-- src/tuning/tuning.h | 4 ++-- src/tuning/tuningsysfs.h | 4 ++-- src/tuning/tuningusb.h | 4 ++-- src/tuning/wifi.h | 4 ++-- traceevent/event-parse.h | 4 ++-- traceevent/event-utils.h | 4 ++-- traceevent/kbuffer.h | 4 ++-- 54 files changed, 108 insertions(+), 108 deletions(-)
src/calibrate/calibrate.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef __INCLUDE_GUARD_CALIBRATE_H -#define __INCLUDE_GUARD_CALIBRATE_H +#ifndef PowerTop_CALIBRATE_H_F9890E37B2EF4D8D9226B0CE6287A6F1 +#define PowerTop_CALIBRATE_H_F9890E37B2EF4D8D9226B0CE6287A6F1extern void one_measurement (int seconds,char *workload);extern void calibrate (void );
src/cpu/cpu.h +2 -2
@@ -23,8 +23,8 @@* Arjan van de Ven <[email protected]> */ -#ifndef __INCLUDE_GUARD_CPUDEV_H -#define __INCLUDE_GUARD_CPUDEV_H +#ifndef PowerTop_CPUDEV_H_741152F9087B4A09BE80E1B8792D1E9F +#define PowerTop_CPUDEV_H_741152F9087B4A09BE80E1B8792D1E9F#include <iostream> #include <vector>
src/cpu/cpu_rapl_device.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Srinivas Pandruvada <[email protected]> */ -#ifndef _INCLUDE_GUARD_CPU_RAPL_DEVICE_H -#define _INCLUDE_GUARD_CPU_RAPL_DEVICE_H +#ifndef PowerTop_CPU_RAPL_DEVICE_H_2D8DEDCA35B84F8DB1E497BDFBF8630B +#define PowerTop_CPU_RAPL_DEVICE_H_2D8DEDCA35B84F8DB1E497BDFBF8630B#include <vector> #include <string>
src/cpu/cpudevice.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_CPUDEVICE_H -#define _INCLUDE_GUARD_CPUDEVICE_H +#ifndef PowerTop_CPUDEVICE_H_7CFB7F2ACEB343BAB922A0959D5CF8F5 +#define PowerTop_CPUDEVICE_H_7CFB7F2ACEB343BAB922A0959D5CF8F5#include <vector> #include <string>
src/cpu/dram_rapl_device.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Srinivas Pandruvada <[email protected]> */ -#ifndef _INCLUDE_GUARD_DRAM_RAPL_DEVICE_H -#define _INCLUDE_GUARD_DRAM_RAPL_DEVICE_H +#ifndef PowerTop_DRAM_RAPL_DEVICE_H_3E79492941D04E26AB65C77724FAAD28 +#define PowerTop_DRAM_RAPL_DEVICE_H_3E79492941D04E26AB65C77724FAAD28#include <vector> #include <string>
src/cpu/rapl/rapl_interface.h +2 -2
@@ -21,8 +21,8 @@* */ -#ifndef RAPL_INTERFACE_H -#define RAPL_INTERFACE_H +#ifndef PowerTop_RAPL_INTERFACE_H_C0544EF7B9D840E6B2CBC9ADD16135DF +#define PowerTop_RAPL_INTERFACE_H_C0544EF7B9D840E6B2CBC9ADD16135DFclass c_rapl_interface {
src/devices/ahci.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_AHCI_H -#define _INCLUDE_GUARD_AHCI_H +#ifndef PowerTop_AHCI_H_A7CA702E879A43C2961569428A4A18D4 +#define PowerTop_AHCI_H_A7CA702E879A43C2961569428A4A18D4#include <string> #include "device.h"
src/devices/alsa.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_ALSA_H -#define _INCLUDE_GUARD_ALSA_H +#ifndef PowerTop_ALSA_H_BC62EBDE30B0418DB610BE0F170309B0 +#define PowerTop_ALSA_H_BC62EBDE30B0418DB610BE0F170309B0#include "device.h" #include "../parameters/parameters.h"
src/devices/backlight.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_BACKLIGHT_H -#define _INCLUDE_GUARD_BACKLIGHT_H +#ifndef PowerTop_BACKLIGHT_H_BE491978F0B0452AA807788965C7C85D +#define PowerTop_BACKLIGHT_H_BE491978F0B0452AA807788965C7C85D#include "device.h"
src/devices/device.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_DEVICE_H -#define _INCLUDE_GUARD_DEVICE_H +#ifndef PowerTop_DEVICE_H_C31A24E582B749588C528415C4A379DE +#define PowerTop_DEVICE_H_C31A24E582B749588C528415C4A379DE#include <vector> #include <limits.h>
src/devices/gpu_rapl_device.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Srinivas Pandruvada <[email protected]> */ -#ifndef _INCLUDE_GUARD_GPU_RAPL_DEVICE_H -#define _INCLUDE_GUARD_GPU_RAPL_DEVICE_H +#ifndef PowerTop_GPU_RAPL_DEVICE_H_397849C175EA41B79DD41294CE4F5960 +#define PowerTop_GPU_RAPL_DEVICE_H_397849C175EA41B79DD41294CE4F5960#include <vector> #include <string>
src/devices/i915-gpu.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_i915_GPU_H -#define _INCLUDE_GUARD_i915_GPU_H +#ifndef PowerTop_i915_GPU_H_B34CDDA9B23E4508BEF4EB4C5EA5D2D3 +#define PowerTop_i915_GPU_H_B34CDDA9B23E4508BEF4EB4C5EA5D2D3#include "device.h"
src/devices/network.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_NETWORK_H -#define _INCLUDE_GUARD_NETWORK_H +#ifndef PowerTop_NETWORK_H_9275A37C545E44D28A575D3723EB6975 +#define PowerTop_NETWORK_H_9275A37C545E44D28A575D3723EB6975#include <sys/time.h>
src/devices/rfkill.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_RFKILL_H -#define _INCLUDE_GUARD_RFKILL_H +#ifndef PowerTop_RFKILL_H_A75F78A7C3EE4EECB17A04FFFE21E0E6 +#define PowerTop_RFKILL_H_A75F78A7C3EE4EECB17A04FFFE21E0E6#include "device.h" #include "../parameters/parameters.h"
src/devices/runtime_pm.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_RUNTIMEPM_H -#define _INCLUDE_GUARD_RUNTIMEPM_H +#ifndef PowerTop_RUNTIMEPM_H_2174F0EBE023440EBA67A74C7A7666C5 +#define PowerTop_RUNTIMEPM_H_2174F0EBE023440EBA67A74C7A7666C5#include "device.h" #include "../parameters/parameters.h"
src/devices/thinkpad-fan.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_THINKPAD_FAN_H -#define _INCLUDE_GUARD_THINKPAD_FAN_H +#ifndef PowerTop_THINKPAD_FAN_H_5DCC6925B2A24F71AB5B0C9A79F56A69 +#define PowerTop_THINKPAD_FAN_H_5DCC6925B2A24F71AB5B0C9A79F56A69#include "device.h" #include "../parameters/parameters.h"
src/devices/thinkpad-light.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_THINKPAD_LIGHT_H -#define _INCLUDE_GUARD_THINKPAD_LIGHT_H +#ifndef PowerTop_THINKPAD_LIGHT_H_F386BD2473CD45AE89C82C4DC893C21A +#define PowerTop_THINKPAD_LIGHT_H_F386BD2473CD45AE89C82C4DC893C21A#include "device.h" #include "../parameters/parameters.h"
src/devices/usb.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_USB_H -#define _INCLUDE_GUARD_USB_H +#ifndef PowerTop_USB_H_F6F0E43D649542ABA96ED52393AF9DB4 +#define PowerTop_USB_H_F6F0E43D649542ABA96ED52393AF9DB4#include "device.h" #include "../parameters/parameters.h"
src/devlist.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __INCLUDE_GUARD_DEVLIST_H__ -#define __INCLUDE_GUARD_DEVLIST_H__ +#ifndef PowerTop_DEVLIST_H_7E30A87AAC714CD388165F6801575FA2 +#define PowerTop_DEVLIST_H_7E30A87AAC714CD388165F6801575FA2 struct devuser { unsigned int pid;
src/display.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef __INCLUDE_GUARD_DISPLAY_H_ -#define __INCLUDE_GUARD_DISPLAY_H_ +#ifndef PowerTop_DISPLAY_H_DEFED091E0DB4B69BEAE98D789CF050C +#define PowerTop_DISPLAY_H_DEFED091E0DB4B69BEAE98D789CF050C#include <map> #include <string>
src/lib.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef INCLUDE_GUARD_LIB_H -#define INCLUDE_GUARD_LIB_H +#ifndef PowerTop_LIB_H_5B1DE34EA0264208ADF6B35D4066A559 +#define PowerTop_LIB_H_5B1DE34EA0264208ADF6B35D4066A559#include <libintl.h> #include <stdint.h>
src/measurement/acpi.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef __INCLUDE_GUARD_ACPI_H -#define __INCLUDE_GUARD_ACPI_H +#ifndef PowerTop_ACPI_H_24AF6C5F75D040C5A80314447D9869C2 +#define PowerTop_ACPI_H_24AF6C5F75D040C5A80314447D9869C2#include "measurement.h"
src/measurement/extech.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef __INCLUDE_GUARD_EXTECH_H -#define __INCLUDE_GUARD_EXTECH_H +#ifndef PowerTop_EXTECH_H_ED2FDFC037164C5FA0E2DBE280118E2C +#define PowerTop_EXTECH_H_ED2FDFC037164C5FA0E2DBE280118E2C#include <pthread.h> #include "measurement.h"
src/measurement/measurement.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef __INCLUDE_GUARD_MEASUREMENT_H -#define __INCLUDE_GUARD_MEASUREMENT_H +#ifndef PowerTop_MEASUREMENT_H_FDE30576BE0F4AF89C1E61D2CF8560F4 +#define PowerTop_MEASUREMENT_H_FDE30576BE0F4AF89C1E61D2CF8560F4#include <vector>
src/measurement/sysfs.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Anssi Hannula <[email protected]> */ -#ifndef INCLUDE_GUARD_SYSFS_H -#define INCLUDE_GUARD_SYSFS_H +#ifndef PowerTop_SYSFS_H_3F3D518E033247EC9BABEE74B1FF671A +#define PowerTop_SYSFS_H_3F3D518E033247EC9BABEE74B1FF671A#include "measurement.h"
src/parameters/parameters.h +2 -2
@@ -22,9 +22,9 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef __INCLUDE_GUARD_PARAMETERS_H_ -#define __INCLUDE_GUARD_PARAMETERS_H_ +#ifndef PowerTop_PARAMETERS_H_0DE23D3B40D44226BED9E23F98F29309 +#define PowerTop_PARAMETERS_H_0DE23D3B40D44226BED9E23F98F29309#include <map> #include <vector>
src/perf/perf.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_PERF_H_ -#define _INCLUDE_GUARD_PERF_H_ +#ifndef PowerTop_PERF_H_2B3761D7B75143AFBFB7C0F8445AA258 +#define PowerTop_PERF_H_2B3761D7B75143AFBFB7C0F8445AA258#include <iostream>
src/perf/perf_bundle.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_PERF_BUNDLE_H_ -#define _INCLUDE_GUARD_PERF_BUNDLE_H_ +#ifndef PowerTop_PERF_BUNDLE_H_E208334018A944189F900F660DEB978D +#define PowerTop_PERF_BUNDLE_H_E208334018A944189F900F660DEB978D#include <iostream> #include <vector>
src/perf/perf_event.h +2 -2
@@ -35,8 +35,8 @@* * For licencing details see kernel-base/COPYING */ -#ifndef _LINUX_PERF_EVENT_H -#define _LINUX_PERF_EVENT_H +#ifndef PowerTop_LINUX_PERF_EVENT_H_8065B9B73FF04CD6844D46B5915FD178 +#define PowerTop_LINUX_PERF_EVENT_H_8065B9B73FF04CD6844D46B5915FD178#include <linux/types.h> #include <linux/ioctl.h>
src/process/interrupt.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_INTERRUPT_H -#define _INCLUDE_GUARD_INTERRUPT_H +#ifndef PowerTop_INTERRUPT_H_5AFEEE5C183A4F85A9F6EF35FAFB4EA5 +#define PowerTop_INTERRUPT_H_5AFEEE5C183A4F85A9F6EF35FAFB4EA5#include <stdint.h>
src/process/powerconsumer.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef __INCLUDE_GUARD_POWER_CONSUMER_ -#define __INCLUDE_GUARD_POWER_CONSUMER_ +#ifndef PowerTop_POWER_CONSUMER_H_A28570A97AB04311808DE3508B732545 +#define PowerTop_POWER_CONSUMER_H_A28570A97AB04311808DE3508B732545#include <stdint.h> #include <vector>
src/process/process.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_PROCESS_H -#define _INCLUDE_GUARD_PROCESS_H +#ifndef PowerTop_PROCESS_H_9FAD6887EB3B4ED2A42C1FBCEF3FE9BD +#define PowerTop_PROCESS_H_9FAD6887EB3B4ED2A42C1FBCEF3FE9BD#include <stdint.h>
src/process/processdevice.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_DEVICE2_H -#define _INCLUDE_GUARD_DEVICE2_H +#ifndef PowerTop_DEVICE2_H_0A9428D54C83431889463DF77AF2F4DF +#define PowerTop_DEVICE2_H_0A9428D54C83431889463DF77AF2F4DF#include <stdint.h>
src/process/timer.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_TIMER_H -#define _INCLUDE_GUARD_TIMER_H +#ifndef PowerTop_TIMER_H_B5CBD21BFDE348A1A2A6159FD3C48CE6 +#define PowerTop_TIMER_H_B5CBD21BFDE348A1A2A6159FD3C48CE6#include <stdint.h>
src/process/work.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_WORK_H -#define _INCLUDE_GUARD_WORK_H +#ifndef PowerTop_WORK_H_2B2D67333B2A430BA81EBB19525EB57A +#define PowerTop_WORK_H_2B2D67333B2A430BA81EBB19525EB57A#include <stdint.h>
src/report/report-formatter-base.h +2 -2
@@ -23,8 +23,8 @@* Written by Igor Zhbanov <[email protected]> * 2012.10 */ -#ifndef _REPORT_FORMATTER_BASE_H_ -#define _REPORT_FORMATTER_BASE_H_ +#ifndef PowerTop_REPORT_FORMATTER_BASE_H_DE05F43D0DC34C559C86CF72264AF0ED +#define PowerTop_REPORT_FORMATTER_BASE_H_DE05F43D0DC34C559C86CF72264AF0ED#include "report-formatter.h"
src/report/report-formatter-csv.h +2 -2
@@ -23,8 +23,8 @@* Written by Igor Zhbanov <[email protected]> * 2012.10 */ -#ifndef _REPORT_FORMATTER_CSV_H_ -#define _REPORT_FORMATTER_CSV_H_ +#ifndef PowerTop_REPORT_FORMATTER_CSV_H_CDDFB88971364C6D808F2EC6C183EE1C +#define PowerTop_REPORT_FORMATTER_CSV_H_CDDFB88971364C6D808F2EC6C183EE1C#include <string>
src/report/report-formatter-html.h +2 -2
@@ -23,8 +23,8 @@* Written by Igor Zhbanov <[email protected]> * 2012.10 */ -#ifndef _REPORT_FORMATTER_HTML_H_ -#define _REPORT_FORMATTER_HTML_H_ +#ifndef PowerTop_REPORT_FORMATTER_HTML_H_A176606F5CF64DB29184D350945BDBAB +#define PowerTop_REPORT_FORMATTER_HTML_H_A176606F5CF64DB29184D350945BDBAB#include <string>
src/report/report-formatter.h +2 -2
@@ -23,8 +23,8 @@* Written by Igor Zhbanov <[email protected]> * 2012.10 */ -#ifndef _REPORT_FORMATTER_H_ -#define _REPORT_FORMATTER_H_ +#ifndef PowerTop_REPORT_FORMATTER_H_D70690A2417A4DCB889F89BA540AAC73 +#define PowerTop_REPORT_FORMATTER_H_D70690A2417A4DCB889F89BA540AAC73#include "report-maker.h" using namespace std;
src/report/report-maker.h +2 -2
@@ -23,8 +23,8 @@* Written by Igor Zhbanov <[email protected]> * 2012.10 */ -#ifndef _REPORT_MAKER_H_ -#define _REPORT_MAKER_H_ +#ifndef PowerTop_REPORT_MAKER_H_38BCE14055AC4CBFA4F57E51E4F35AFD +#define PowerTop_REPORT_MAKER_H_38BCE14055AC4CBFA4F57E51E4F35AFD/* This report generator implements the following document structure: * body
src/report/report.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef __INCLUDE_GUARD_REPORT_H_ -#define __INCLUDE_GUARD_REPORT_H_ +#ifndef PowerTop_REPORT_H_3C83FC97D1124ABF9C2FFE3C68C4A8E5 +#define PowerTop_REPORT_H_3C83FC97D1124ABF9C2FFE3C68C4A8E5#include <string> #include <stdio.h>
src/tuning/bluetooth.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_BLUETOOTH_TUNE_H -#define _INCLUDE_GUARD_BLUETOOTH_TUNE_H +#ifndef PowerTop_BLUETOOTH_TUNE_H_6AC12005D04F4F5996DAE78D17245D66 +#define PowerTop_BLUETOOTH_TUNE_H_6AC12005D04F4F5996DAE78D17245D66#include <vector>
src/tuning/ethernet.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_ETHERNET_TUNE_H -#define _INCLUDE_GUARD_ETHERNET_TUNE_H +#ifndef PowerTop_ETHERNET_TUNE_H_DE87CB1EBF2B467DB12F75F1AA69312E +#define PowerTop_ETHERNET_TUNE_H_DE87CB1EBF2B467DB12F75F1AA69312E#include <vector>
src/tuning/iw.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __IW_H -#define __IW_H +#ifndef PowerTop_IW_H_30C72AD12B42444AACC3170CCEA1C220 +#define PowerTop_IW_H_30C72AD12B42444AACC3170CCEA1C220/* * This code has been blatently stolen from
src/tuning/nl80211.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __LINUX_NL80211_H -#define __LINUX_NL80211_H +#ifndef PowerTop_LINUX_NL80211_H_17D5AD8F176241908638E7E1DB927E19 +#define PowerTop_LINUX_NL80211_H_17D5AD8F176241908638E7E1DB927E19/* * 802.11 netlink interface public header *
src/tuning/runtime.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_RUNTIME_TUNE_H -#define _INCLUDE_GUARD_RUNTIME_TUNE_H +#ifndef PowerTop_RUNTIME_TUNE_H_6BA73F614EC5449D99F58BEA91AC8F5C +#define PowerTop_RUNTIME_TUNE_H_6BA73F614EC5449D99F58BEA91AC8F5C#include <vector>
src/tuning/tunable.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_TUNABLE_H -#define _INCLUDE_GUARD_TUNABLE_H +#ifndef PowerTop_TUNABLE_H_7FE973566E7F4D5CB61CF22CB1467CE2 +#define PowerTop_TUNABLE_H_7FE973566E7F4D5CB61CF22CB1467CE2#include <vector>
src/tuning/tuning.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_TUNING_H -#define _INCLUDE_GUARD_TUNING_H +#ifndef PowerTop_TUNING_H_14E511B2521146518C00571A47372A00 +#define PowerTop_TUNING_H_14E511B2521146518C00571A47372A00extern void initialize_tuning (void );extern void tuning_update_display (void );
src/tuning/tuningsysfs.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_SYSFS_TUNE_H -#define _INCLUDE_GUARD_SYSFS_TUNE_H +#ifndef PowerTop_SYSFS_TUNE_H_554FE0E043594960A8C20B2D0DAF5A0C +#define PowerTop_SYSFS_TUNE_H_554FE0E043594960A8C20B2D0DAF5A0C#include <vector>
src/tuning/tuningusb.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_USB_TUNE_H -#define _INCLUDE_GUARD_USB_TUNE_H +#ifndef PowerTop_USB_TUNE_H_63B099A9676D4D559AB8B416403488F2 +#define PowerTop_USB_TUNE_H_63B099A9676D4D559AB8B416403488F2#include <vector>
src/tuning/wifi.h +2 -2
@@ -22,8 +22,8 @@* Authors: * Arjan van de Ven <[email protected]> */ -#ifndef _INCLUDE_GUARD_WIFI_TUNE_H -#define _INCLUDE_GUARD_WIFI_TUNE_H +#ifndef PowerTop_WIFI_TUNE_H_0ED852283D7243149E21D3565BB3ED55 +#define PowerTop_WIFI_TUNE_H_0ED852283D7243149E21D3565BB3ED55#include <vector>
traceevent/event-parse.h +2 -2
@@ -17,8 +17,8 @@* * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#ifndef _PARSE_EVENTS_H -#define _PARSE_EVENTS_H +#ifndef PowerTop_PARSE_EVENTS_H_BE08409DC2034B40A9FC849B4AF15404 +#define PowerTop_PARSE_EVENTS_H_BE08409DC2034B40A9FC849B4AF15404#include <stdarg.h> #include <regex.h>
traceevent/event-utils.h +2 -2
@@ -17,8 +17,8 @@* * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#ifndef __UTIL_H -#define __UTIL_H +#ifndef PowerTop_UTIL_H_899675D1CB4A408E85111F5E9FB8CA42 +#define PowerTop_UTIL_H_899675D1CB4A408E85111F5E9FB8CA42#include <ctype.h>
traceevent/kbuffer.h +2 -2
@@ -18,8 +18,8 @@* * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#ifndef _KBUFFER_H -#define _KBUFFER_H +#ifndef PowerTop_KBUFFER_H_550829151C6D4F51B25F8EE6BF3B9F65 +#define PowerTop_KBUFFER_H_550829151C6D4F51B25F8EE6BF3B9F65#ifndef TS_SHIFT #define TS_SHIFT 27
Signature · 1 line
2.1.3
Alexandra Yates
Quoted 4 lines
Quoted 3 lines
If you feel very strongly about this please send your patches to the mailing list.
Quoted 9 lines
Would you like to integrate the attached update suggestion into your source code
repository?How do you want to proceed with the remaining update candidates?
Regards,
Markus
Markus,
Have you come across any name clashes with PowerTOP? Can you reproduce the error?
Thank you,
Alexandra.
SF Markus Elfring
Quoted 1 line
Have you come across any name clashes with PowerTOP?
I try to clean-up source files generally which tamper with the reserved name space in the programming languages "C" and "C++".
Quoted 1 line
Can you reproduce the error?
I suggest to reconsider an other technical aspect.
Are you aware of an interpretation of the corresponding standard specifications that a questionable name selection could result in undefined behaviour?
https://www.securecoding.cert.org/confluence/display/seccode/CC.+Undefined+Behavior#CC.UndefinedBehavior-ub_106
How would you try to reproduce anything when a detail was marked as potentially undefined?
Regards,
Markus