From bf94c8f3b3541df4a9bfd5866db13590eca0f0e1 Mon Sep 17 00:00:00 2001 From: Inaky Perez-Gonzalez Date: Mon, 13 Jun 2016 15:55:41 -0700 Subject: [PATCH] doc: remove warning on failed code highlighting Four code snippets fail to be properly recognized by the code highlighter; the makefile snippets seem to be because of the $ character (and I have found a way to escape it out). The C code, I haven't been able to find out why. Killed the warning by setting the code-block style to 'none' on all of them. It is not the best sollution, but it beats a polluted build process. Change-Id: I8fa7d327354a93bacad40e25596c9dbaf9ea1e92 Signed-off-by: Inaky Perez-Gonzalez --- .../microkernel/microkernel_memory_pools.rst | 28 +++++++++---------- doc/reference/kbuild/kbuild_makefiles.rst | 6 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/kernel/microkernel/microkernel_memory_pools.rst b/doc/kernel/microkernel/microkernel_memory_pools.rst index 80e15bdb657..5cc6716ed68 100644 --- a/doc/kernel/microkernel/microkernel_memory_pools.rst +++ b/doc/kernel/microkernel/microkernel_memory_pools.rst @@ -134,15 +134,15 @@ This code waits up to 5 ticks for an 80 byte memory block to become available and gives a warning if a suitable memory block is not obtained in that time. -.. code-block:: c +.. code-block:: none - struct k_block block; + struct k_block block; - if (task_mem_pool_alloc(&block, MYPOOL, 80, 5) == RC_OK) { - /* use memory block */ - } else { - printf('Memory allocation timeout'); - } + if (task_mem_pool_alloc(:&block, MYPOOL, 80, 5) == RC_OK) { + /* use memory block */ + } else { + printf('Memory allocation timeout'); + } Example: Requesting a Memory Block from a Pool with a No-Blocking Condition =========================================================================== @@ -150,15 +150,15 @@ Example: Requesting a Memory Block from a Pool with a No-Blocking Condition This code gives an immediate warning when it can not satisfy the request for a memory block of 80 bytes. -.. code-block:: c +.. code-block:: none - struct k_block block; + struct k_block block; - if (task_mem_pool_alloc (&block, MYPOOL, 80, TICKS_NONE) == RC_OK) { - /* use memory block */ - } else { - printf('Memory allocation timeout'); - } + if (task_mem_pool_alloc (&block, MYPOOL, 80, TICKS_NONE) == RC_OK) { + /* use memory block */ + } else { + printf('Memory allocation timeout'); + } Example: Freeing a Memory Block Back to a Pool ============================================== diff --git a/doc/reference/kbuild/kbuild_makefiles.rst b/doc/reference/kbuild/kbuild_makefiles.rst index 0cf3dff4b55..c3169f26874 100644 --- a/doc/reference/kbuild/kbuild_makefiles.rst +++ b/doc/reference/kbuild/kbuild_makefiles.rst @@ -63,7 +63,7 @@ example, if the option :option:`CONFIG_VAR` is set and it implies that a source file must be added in the compilation process, then the following line adds the source code conditionally: -.. code-block:: make +.. code-block:: none obj-$(CONFIG_VAR) += .o @@ -88,9 +88,9 @@ an additional lever of recursion. Directories can also be conditionally added: -.. code-block:: make +.. code-block:: none - oby-$(CONFIG_VAR) += / + obj-y-$(CONFIG_VAR) += / The subdirectory must contain its own Makefile following the rules described in :ref:`makefile_conventions`.